A4WD1 & AL5 Arm Tutorial for PS2 Control (Bot Board II)
A4WD1 & AL5 Arm Tutorial for PS2 Control v2.0
Updated 12/20/2011 Safety first! Wear eye protection and never touch a powered robot! Note: This guide follows the A4WD1 and AL5 arm assembly guides. The Sabertooth has already been installed. Software: |
Image of A4WD1. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Step 1. Mounting the Bot Board II Add the four standoffs for the Bot Board II to the robot's top panel as shown. Use four .250" hex socket head screws.
|
Figure 1. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Step 2. Install the Bot Board as shown, using four of the .250" 4-40 screws. Install the Atom Pro chip as shown.
|
Figure 2. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Step 3. Connecting Sabertooth to Bot Board II The Sabertooth 2x10 R/C was primarily designed to be connected to a remote control receiver. It has a BEC (battery elimination circuit) that puts 5vdc on the red wires to power the receiver. Because the Bot Board II has its own power supply, it is necessary to bypass the BEC. Use an exacto knife to carefully pry the black tab up and slip the red wire out of the black housing as shown in Figure 3. Bend the red wires up and use electrical tape to cover them as shown. This will prevent accidental shorts. |
Figure 3. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Step 4. Refer to Table 4 and the schematic (Figure 4) for Bot Board II and Sabertooth wiring connections. Double check your wiring. Make sure the red battery wire goes to the (+) terminal! |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Step 5. Set the Sabertooth switches to the settings listed in Table 5 and Figure 5.
|
Figure 5. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Schematic - Figure 5. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Step 6. Programming the Atom Pro Download the BASIC Micro Studio development software. Install and run the program on your PC. The goal here is to load a program into the editor and program the Atom Pro with the code. Connect the serial data cable to the PC's serial port. This can be recognized by having 9 pins that stick out. Connect the other end of the serial data cable to the Bot Board's DB9 port. You can use a USB-to-Serial adaptor if your PC doesn't have a physical serial port; see the troubleshooting guide for a list of tested USB-to-serial adaptors. Please consult the Atom Pro programming tutorial and the serial troubleshooting guide if you have difficulties with this. |
Figure 6. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Step 7.
Differential or Tank Mode Test (Required) Download this file (a4wd1tst2.zip) and run it. For this program, on the Bot Board II, the "A" button is left channel throttle, "C" button is right channel throttle, and "B" is a speed and direction reset. This program requires the Sabertooth's Switch 1 to be flipped to the "Off" or "Independent Control" position. Upon powering up the robot, you should hear four ascending notes. Pressing A once results in a beep and slow forward motion (10%) on the left channel only. Pressing nine more times results in 100% power. Continuing to press A will make the motor act as above, except only for the right channel. The C button will control the left motor in a similar manner. Pressing the B button will reset the speed and direction of both left and right. Note: The Sabertooth's red Error LED will light to indicate overheating or current limit. The green Status1 LED will glow dimly when power is applied, and brightly when it's receiving pulses from the microcontroller. The green Status2 LED will flash out the detected number of lithium cells when lithium mode is enabled. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Step 8.
Throttle and Steering Mode Test (Optional) Make sure the Sabertooth's Switch 1 is flipped back into the "On" or "Enable Mixed Mode" position! Download this file (a4wd1tst1.zip) and run it. For this program, on the Bot Board II, the "B" button is throttle and the "A" and "C" buttons are steering. Upon powering up the robot, you should hear four ascending notes. Pressing B once results in a beep and slow forward motion (10%). Pressing nine more times results in 100% power. After the motor is at 100% power, pressing B will reduce the speed in 10% increments until it stops. Continue to press B to make the robot move as above, only in reverse. Press Reset, then B twice. Now press C a few times to see the robot make a gradual left turn. Pressing A a few times will return to forward motion, and continuing to press A will result in gradual right turn. Experiment with these buttons to understand how throttle and steering can be used to control the vehicle's motion. Note: The Sabertooth's red Error LED will light to indicate overheating or current limit. The green Status1 LED
will glow dimly when power is applied, and brightly when it's receiving pulses from the microcontroller. The green Status2 LED will flash out
the detected number of lithium cells when lithium mode is enabled. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Step 9. Now that the chassis is fully tested, it's time to add the arm. Attach the arm to the A4WD1 as shown. Any AL5 arm will work (AL5A, B, C, or D), with or without wrist rotate. You will edit the code later on to match your arm. |
Figure 9. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Step 10. Now it's time to set up the A4WD1 for PS2 R/C control. You will need to change the Bot Board's power bus jumpers according to Table 10 and Schematic 10 for the AL5 arm. Note: Refer only to Figure 10 for connection information. The cable colors in the picture may be outdated. If your cable's colors do not match the diagram, you can find a complete listing of possible colors here.
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Schematic - Figure 10. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Step 11. Servo and Motor Controller Calibration Put the rover up on a CD spindle or similar, to keep the wheels elevated. Download the A4WD AL5 Arm Servo Offset Finder program, and load it into the BASIC Micro Studio. In the IDE, at the bottom of the screen, click on the "Terminal1" tab. Change the Baud Rate to 9600, COM port to the port you're using, Echo to NoEcho, then click Connect (it will change to say Disconnect).
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Step 12. Program the Atom Pro, and follow these instructions to find your robot's offsets.
Note, if you have the Speaker enabled, when you press the B button you will hear a short tone. The tone will raise in pitch when you change from servo to servo, and will lower in pitch and be longer when you get back to Start.
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Step 13. Place the robot in a position as close to neutral as possible, and turn it on. Your robot should go to and hold the neutral position, and should resemble figure 13. If the joints are off by more than 15° you may have made an error in assembly. To correct this, remove the center screw from the round servo horn, pull the servo horn off the servo, rotate until it's aligned, then reattach the servo horn. Use the A, B, and C buttons to straighten the arm as shown in Figure 13. |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Step 14. After you've cycled through the servos and adjusted them to match Figure 13, pressing the B button again will send your servo offset values to the Terminal window. See Figure 14 for an example. Your offset values will be different from those shown in the image. Write your offset values down. You'll need them for the next step.
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Step 15. Open this file (rover_v1.2.zip) with the BASIC Micro Studio editor. Find the section referencing offsets (starts at program line 84). Fill in the offset values you wrote down. |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Step 16. Select the proper arm type (starts at program line 73). If you're using FSR sensor on the gripper, change the 0 to a 1 on that line. (The FSR assembly and set up guide can be found here.) |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Step 17. You will want to set the bot on something so that the wheels aren't touching the ground. When the program is run, there will be a series of beeps telling you that the Atom is trying to communicate with the PS2 game controller. When communication is established, the beeps will stop, but you may need to put the controller in Analog mode. This program lets you control the movement of the bot in two modes. On powerup, the vehicle is controlled with a tank mode, meaning left and right joysticks control the left and right motors independently. Pressing the right joystick in (R3) switches the control mode from tank mode to a single joystick control mode. Up and Down on the D-pad control the robot's max speed. This is useful when precise positioning of the robot base is required. Consult Tables 17-1, 17-2, and 17-3 for more information on controlling the 4WD. |
|