A4WD1 with PS2 Control Adjusting Stopped Motor Values

I am new to robotics and new to lynxmotion. I purchased a rover kit with PS2 control. (A4WD1 with PS2 control). I assembled the kit and installed the Sabertooth controller and Basic Atom Pro 28 on the Bot Board II. I uploaded the PS2 (ps2a4wd1.bas) control program and I am able to control the rover with the PS2 controller. I have two problems and a question:

Problem 1: When I apply power to the Sabertooth board, the green LED illuminates. When I switch the BotBoard on, the left wheels begin to rotate and the right wheels remain stationary. Both sets of motors respond to the joystick commands. However, the left wheels are always incrementally out of sync with the right wheels in the speed of their rotation. That is, when the joystick is centered at the neutral position, the right wheels are stationary but the left wheels are running at approximately 10% forward throttle. When the joystick is moved forward, both sets of wheels move but the right wheels (which were stationary at the neutral position) move at a slower rate than the left wheels (which were formerly moving at 10% forward throttle). When the joystick is moved backward, the right wheels (stationary at the neutral joystick position) begin to rotate in reverse and the left wheels (rotating forward at 10% throttle at the neutral joystick position) stop rotating.

I tried pressing the start button on the PS2 controller to null the joysticks but that does not stop the left side motors from rotating.

I switched on the autocalibrate function on the Sabertooth board (dip switch 5) and that stops the rotating left wheels after a half second or so (that is, the wheels begin to rotate when the Bot Board is activated and then, after a half a second, they stop). Autocalibrate seems to correct the problem so the rover can be controlled normally with the PS2 controller.

I uploaded the test programs in the tutorials in Basic Micro IDE. The Bot Board and BAP 28 ran properly with Aprotut1.bas and bb2tst01.bas. However, I noticed anomalies with a4wd1tst2.bas a4wd1tst1.bas. Buttons A, B, C control wheel speed, generally increasing forward and turning speeds in increments. But, when the programs start running after uploading, the left and right wheel pairs start running in opposite directions (turning mode). The reset button on the BotBoard does not correct this nor does the B button on the BotBoard when I am running a4wd1tst2.bas. There may be other discrepancies between the functions of these buttons and the responses the tutorial indicates we are supposed to get but I have not focused on recording each response. I can if this will help troubleshoot the problem.

I assume that there is either a calibration issue in the PS2 control program (perhaps the neutral value has not been properly set) or I may have a jumper incorrectly installed. I have the jumpers set to match figure 10 in the build134.htm document for pins 0-3 and 12-15. I do not have a gripper installed. The only pins I am using are for the motor controls and the PS2 receiver.

I would like to correct it so that I do not have to engage the autocalibrate function. I noticed a post under “robots>rovers>AW4D1 with PS2 controller” dated November 17 2008 from Robot Dude which seems to address this issue. It says:

“The Sabertooth may not stop the wheels with 1500uS pulses. I just found this out recently. The Sabertooth could be like 2% off. John at DE said “However, in fixed throttle R/C mode, “stopped” can theoretically be anywhere between 1470 and 1530. Most of the controllers are somewhat closer than this.” So if you use autocal then make sure the microcontroller gets turned on before the Sabertooth, and it sends the stopped values without interruption. If you turn autocal off then you may need to adjust the stopped value up or down a little.”

So, I was wondering how I can adjust the stopped value on either the Sabertooth board or the Bot Board (through a setting in the PS2 control program, for example)?

Problem 2: When operating the rover with ps2a4wd1.bas and setting the Sabertooth autocalibrate function on, the rover works well and is responsive to the PS2 controller. However, occasionally if I change the speed control by pressing L1 or L2, the rover will suddenly shift to full forward speed and be unresponsive to the joystick signals.

Question: Could you explain the vibrate function on the PS2 controller. When I switch this to “on” nothing seems to happen. Is this a function I should be able to activate and if so how is that done?

Thank you.

Looking through the code again, I noticed that there aren’t any offset constants like there usually are… :unamused:

You’ll have to look in your code for this section:

'CALCULATE DRIVE SPEEDS FROM JOYSTICK POSITIONS AND SPEED LIMIT ldrive=((lvert*GEAR) + 1500 - (GEAR *128)) ' Forward / backward rdrive=((lhori*3) + 1500 - (3 *128)) ' steering
and change the 1500s to values that make the robot stop.

If you don’t know these values, there’s two ways to figure it out:

The Easy Way: Plug your Sabertooth to an SSC-32 and connect to your computer with Lynxterm. Click on “ALL=1500” and adjust the sliders until movement stops. Then plug those values into your basic pro program, and you should be ok.

The Hard Way: If you don’t have an SSC-32 or you happen to be a masochist, you can simply guess the values. Reprogram the robot. Test. Repeat until you’re done or green in the face. :mrgreen:

That is strange. It’s not an issue that I’ve personally seen with the in-house rover. Are your batteries fully charged? both in the robot and in the controller? Does this happen when autocalibrate is turned off?

(In gaming) The vibrate function is meant to be a feedback from the game to the gamer. You shoot a gun, you feel it in your hands… sort of.
In our robots, we don’t use it, but that doesn’t mean that it can’t be used.

We have used the rumble feature in the past. If you directed the robot towards a wall it will stop the bot and energize the rumble as a warning.