Sabertooth 2x10 User's Guide: February 2007
Sabertooth 2x10 User's Guide: February 2007
Sabertooth 2x10 User's Guide: February 2007
February 2007
Dimensions:
Size: 2.3 x 3 x .7 Weight: 2.1oz 59 x 75 x 17mm
Features
Mixed and independent options:
Sabertooth features mixed modes designed especially for differential drive robots, where two motors provide both steering and propulsion. It also has independent options in all operating modes. This is useful for if you have two motors to control, but they arent necessarily being used to drive a differential drive robot. The motors do not need to be matched or even similar, as long as they both are within Sabertooths operating limits.
Compact Size:
Sabertooth utilizes surface mount construction to provide the most power from a compact package. Its small size and light weight mean you have more space for cargo, batteries, or can make your robot smaller and more nimble than the competition.
Carefree reversing:
Unlike some other motor drivers, there is no need for the Sabertooth to stop before being commanded to reverse. You can go from full forward immediately to full reverse or vice versa. Braking and acceleration are proportional to the amount of reversal commanded, so gentle or rapid reversing is possible.
Step 1: Strip the wire which you are using approximately The wires may be 14 gauge to 30 gauge
Step 2: With a small screwdriver, turn the top screw counter-clockwise until it stops gently.
Step 3: Insert the stripped portion of the wire into the opening in the screw terminal
Step 4: Turn the top screw clockwise until you encounter resistance, then tighten the screw firmly. Pull on the wire gently to ensure that it is secured.
Motor1 Terminals
Motor 1 is connected to terminals M1A and M1B as shown below. If the motor runs in the opposite way that you want, you may reverse the motor wires to reverse rotation. Motor 2 is connected to terminals M2A and M2B
The motors connect to terminals M1A/B and M2A/B
Battery Terminals B+ and BThe battery or power supply is connected to terminals B- and B+. B- connects to the negative side of the battery (usually black.) B+ connects to the positive side of the battery (usually red or yellow.) It is usually best to The battery connects to terminals B+ and Bconnect the battery through a connector instead of directly to the motor driver. This makes it easy to unplug the battery for charging, and prevents plugging in the battery backwards.
Warning! Be very careful to wire and plug in the battery and connector correctly. Connecting the battery backwards will destroy the Sabertooth and will void the warranty.
If your robot or device is constructed from insulating materials such as wood or plastic, it may be necessary to mount the Sabertooth on standoffs to allow air to circulate. This is shown in Figure 2.3 If your robot or device is constructed from metal, it is usually better to attach the bottom heat spreader of the Sabertooth directly to the frame, without standoffs. This will allow your frame to act as a heat sink and will cause the Sabertooth to run cooler. This is shown in Figure 2.4
Lithium cutoff:
Switch 3 of the DIP switch block selects lithium cutoff. If switch 3 is in the down position as shown the Sabertooth will automatically detect the number of series lithium cells at startup, and set a cutoff voltage of 3.0 volts per cell. The number of detected cells is flashed out on the Status LED. If the number of cells detected is too low, your battery is in Lithium Cutoff enabled a severely discharged state and must be charged before operation. Failure to do so may cause damage to the battery pack. When 3.0V per cell is reached, the Sabertooth will shut down, preventing damage to the battery pack. This is necessary because a lithium battery pack discharged below 3.0v per cell will lose capacity and batteries discharged below 2.0v per cell may not ever recharge. Lithium cutoff mode may also be useful to increase the number of battery cycles you can get when running from a lead acid battery in noncritical applications. Because the system will continue to draw some power, even with the motor shut down, it is important to unplug the battery from the Sabertooth promptly once the cutoff is reached when using lithium batteries. If the Sabertooth is being run from NiCd, NiMH or alkaline batteries, or from a power supply, switch 3 should be in the up position.
Switch 6: 4x sensitivity
If switch 6 is in the UP position, the input signal range is from 0v to 5v, with a zero point of 2.5v. If switch 6 is in the DOWN position, 4x sensitivity mode is enabled. In this mode, the input signal range is from 1.875V to 3.125V, with a zero point of 2.5v. This is useful for building analog feedback loops
Switch 6: 4x sensitivity
There are three operating options for R/C mode. These are selected with switches 4, 5 and 6.
If switch 6 is set in the DOWN position, then Microcontroller mode is enabled. This disables the Timeout Failsafe and auto-calibration. This means that the Sabertooth will continue to drive the motor according to the last command until another command is given. If the control link is possible unreliable like a radio - then this can be dangerous due to the robot not stopping. However, it is extremely convenient if you are controlling the Sabertooth from a microcontroller. In this case, commanding the controller can be done with as little as three lines of code. Output_High(Pin connected to S1) Delay(1000us to 2000us) Output_Low(Pin connected to S1)
What baud rate to use is dependent on what your host can provide and the update speed necessary. 9600 baud or 19200 baud is recommended as the best starting points. If communication is unreliable, decrease the baud rate. If communications are reliable, you may increase the baud rate. The maximum update speed on the Sabertooth is approximately 2000 commands per second. Sending characters faster than this will not cause problems, but it will not increase the responsiveness of the controller either. The baud rate may be changed with power on by changing the DIP switch settings. There is no need to reset or cycle power after a baud rate change. There are 2 operating options for Simplified Serial. These are selected by the position of Switch 6.
Packet Overview
The packet format for the Sabertooth consists of an address byte, a command byte, a data byte and a seven bit checksum. Address bytes have value greater than 128, and all subsequent bytes have values 127 or lower. This allows multiple types of devices to share the same serial line. An example packet and pseudo-code to generate it are shown in Figures 7.1 and 7.2 Void DriveForward(char address, char speed) Packet { Address: 130 Putc(address); Command : 0 Putc(0); Data: 64 Putc(speed); Checksum: 66 Putc((address + 0 + speed) & 0b01111111); } Figure 7.1: Example 50% forward Figure 7.2: Pseudocode to generate 7.1
Address: 128
Address: 129
Address: 130
Address: 131
Address: 132
Address: 133
Address: 134
Address: 135
Commands:
The command byte is the second byte of the packet. There are four possible commands in packetized serial mode. Each is followed by one byte of data
2: Min voltage (decimal 2, binary 0b00000010, hex 0h02) This is used to set a custom minimum voltage for the battery feeding the Sabertooth. If the battery voltage drops below this value, the output will shut down. This value is cleared at startup, so much be set each run. The value is sent in .2 volt increments with a command of zero corresponding to 6v, which is the minimum. Valid data is from 0 to 120. The function for converting volts to command data is Value = (desired volts-6) x 5
3: Max voltage (decimal 3, binary 0b0000011, hex 0h03) This is used to set a custom maximum voltage. If you are using a power supply that cannot sink current such as an ATX supply, the input voltage will rise when the driver is regenerating (slowing down the motor) Many ATX type supplies will shut down if the output voltage on the 12v supply rises beyond 16v. If the driver detects an input voltage above the set limit, it will put the motor into a hard brake until the voltage drops below the set point again. This is inefficient, because the energy is heating the motor instead of recharging a battery, but may be necessary. The driver comes preset for a maximum voltage of 30V. The range for a custom maximum voltage is 0v-25v. The formula for setting a custom maximum voltage is Value = Desired Volts*5.12 If you are using any sort of battery, then this is not a problem and the max voltage should be left at the startup default.
10: Turn right mixed mode (decimal 10, binary 0b00001010, hex 0h0a)
This is used to command the vehicle to turn right in mixed mode. Valid data is 0-127 for zero to maximum turning speed.
11: Drive turn left mixed mode (decimal 11, binary 0b00001011, hex 0h0b)
This is used to command the vehicle to turn leftt in mixed mode. Valid data is 0-127 for zero to maximum turning speed.
12: Drive forwards/back 7 bit (decimal 12, binary 0b00001100, hex 0h0c)
This is used to command the vehicle to move forwards or backwards. A command of 0 will cause maximum reverse, 64 will cause the vehicle to stop, and 127 will command full forward.
Checksum:
To prevent data corruption, each packet is terminated with a checksum. If the checksum is not correct, the data packet will not be acted upon. The checksum is calculated as follows: Checksum = address byte +command byte +data byte The checksum should be added with all unsigned 8 bit integers, and then ANDed with the mask 0b01111111 in an 8 bit system.
Example: So in this function, if address is 130, command is 0 (for driving forward), speed is 64, the checksum should calculate as follows: 130+0+64 = 194 194 in binary is 0b11000010 0b11000010 & 0b01111111 = 0b01000010 Once all the data is sent, this will result in the Sabertooth with address 130 driving forward at roughly half throttle.
Emergency Stop:
In Packetized Serial mode, the S2 input is configured as an active-low emergency stop. It is pulled high internally, so if this feature isnt needed, it can be ignored. If an emergency stop is desired, all the S2 inputs can be tied together. Pulling the S2 input low will cause the driver to shut down. This should be tied to an emergency stop button if used in a device that could endanger humans.