4WD1 & L5/L6 Programming Tutorial - RC
Rev. 1.

Updated 11/08/2006

Safety first! Wear eye protection and never touch a powered robot!

Note: This tutorial follows the tutorial for Electronics Installation and Testing Instructions.

Note: the PS2 control programs have been verified to work with all Lynxmotion, Madcatz, Pelican, and Hiteck wireless controllers only.


Image of 4WD1.
 
Step 1. Refer to Tables 3-1 through 6-1 for connection information. We used double-sided foam tape to hold the PS2 connector cable in place under the middle panel, as well as attaching a Sharp GP2D12 sensor on the front. The SSC-32 is stacked on top of the Bot Board using hardware from the arm kit.
Figure 1.
 
Step 2. Install the L5 or L6 arm as shown. This requires 4WD1 Add-On Deck for L5/L6 arm (AOD-03). By moving the PC boards around it may be possible to mount the arm directly to the top of the chassis. However, using the Add-On Deck makes it much easier to access the electronics.
Figure 2.
 
Step 3. The Scorpion needs to be set up for differential steering mode and the battery elimination circuit (BEC) must be disabled. This can be done by cutting a trace as illustrated in the Scorpion manual, or you can remove the red wire on the servo cables for left and right control inputs.
Bot Board Jumpers
Connect 7.2vdc battery to VS
Enable Speaker
Connect I/O AX0-3 Power Bus to VL
Connect I/O 4-7 Power Bus to VL
Connect VL = VS
Disable Scorpion BEC (See text)

Table 3-1

 
Step 4. Configure the SSC-32 for 38.4k baud, serial communications, and VL = VS.
SSC-32 Jumpers
Connect 7.2vdc battery to VS
Enable 38.4k baud
Connect VL = VS
Enable TTL Serial Comm

Table 4-1

 
Step 5. Set up the Bot Board and Scorpion as illustrated in Table 5-1.
Bot Board Connections
P0 L Scorpion channel P8 N/A
P1 R Scorpion channel P9 Speaker
P2  N/A P10 N/A
P3 N/A P11 N/A
P4 PS2 Data P12 N/A
P5 PS2 Command P13 N/A
P6 PS2 Select P14 N/A
P7 PS2 Clock P15 SSC-32 Data
AX0 GP2D12 -- --

Table 5-1

 
Step 6. Set up the SSC-32 as illustrated in Table 6-1. Simply plug in the servo associated with the function to the corresponding pin.
SSC-32 Connections
P8 Base Rotate P11 Wrist
P9 Shoulder P12 Gripper
P10 Elbow P13 W Rotate

Table 6-1

 
Step 7. Open this file (4wdl6p1.bas) with the BASIC Atom editor. Find the section referencing L5 and L6 arm length constants. Remove the semicolons (remarks) from in front of the arm you are using. For example, if you are using an L6 arm, the text should look like Table 7-1.
Arm Selection in Program

;L6
Arm_Length con 121      ;4.75" = 121mm (4.75 * 25.4)
Forearm_Length con 121  ;4.75" = 121mm (4.75 * 25.4)
Hand_Length con 146     ;5.75" = 146mm (5.75 * 25.4)

;L5
;Arm_Length con 95       ;3.75" = 95mm (3.75 * 25.4)
;Forearm_Length con 95   ;3.75" = 95mm (3.75 * 25.4)
;Hand_Length con 127     ;5.00" = 146mm (5.00 * 25.4)

Table 7-1

 
Step 8. 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) changes it to a single joystick control mode. Left and Right on the D-pad control the max speed. This is useful when precise positioning of the robot base is required.

When the robot is driven too close to an obstacle, you will hear a tone from the speaker that gets higher the closer to an obstacle the robot is. After a threshold is reached, the robot will ignore forward commands to prevent crashing. Pressing Start disables this function.

Consult Tables 8-1 and 8-2 for more information on controlling the 4WD.

PS2 Controls (4WD Tank Mode)
L Joy U Left Side Forward R Joy U Right Side Forward
L Joy D Left Side Backward R Joy D Right Side Backward
L Joy L N/A R Joy L N/A
L Joy R N/A R Joy R N/A
L1 Left Neutral Val. Up R1 Right Neutral Val. Up
L2 Left Neutral Val. Dn R2 Right Neutral Val. Dn
L3 N/A R3 Switch control mode
D-Pad U N/A Tri N/A
D-Pad D N/A X N/A
D-Pad L Speed Limit Down Squ N/A
D-Pad R Speed Limit Up O N/A
Start Dis/En Crash Monitor Select Switch to Arm mode

Table 8-1

PS2 Controls (4WD Single-Joystick Mode)
L Joy U N/A R Joy U Forward
L Joy D N/A R Joy D Backward
L Joy L N/A R Joy L Left
L Joy R N/A R Joy R Right

Table 8-2

 
Step 9. Pressing Select switches from 4WD1 control to Arm control. Consult Table 9-1 for more information on controlling the arm.

   - Video of 4WD1 with L6 arm; assorted movements.
   - Video of 4WD1 with L6 arm; arm base rotate.

PS2 Controls (Arm Control Mode)
L Joy U Gripper Up R Joy U Gripper Angle Up
L Joy D Gripper Down R Joy D Gripper Angle Down
L Joy L Gripper Back R Joy L Base Rotate Left
L Joy R Gripper Away R Joy R Base Rotate Right
L1 Wrist Rotate CW R1 Gripper Close
L2 Wrist Rotate CCW R2 Gripper Open
L3 Reverses L Joy L/R R3 N/A
D-Pad U N/A Tri Enable/Disable Arm
D-Pad D N/A X Go to Home Position
D-Pad L N/A Squ N/A
D-Pad R N/A O N/A
Start N/A Select Switch to 4WD mode

Table 9-1