We have started a robotics class using the vex Clawbot kit.
Our problem is the drive motors for the bot. They work in forward and reverse just fine, but when shut off the motors still drive slightly with no buttons pushed. We did not do any additional programing other than what came in the bot kit. We are using motor controllers as well.
Any help or suggestions would be greatly appreciated!!
To be honest I am not sure what programming came with the kit. WE just did the USB configuration that came with the bot’s directions. I am assuming we are using the default code that came with the cortex controller
We are running 5 clawbots and this is the only one that is doing this.
Thanks for the quick response and help
You need to calibrate your joysticks. Take a look at the instructions here. Basically the joystick is reporting values slightly off center so even when the joystick is centered, the cortex believes you are telling it to go a little bit.
It might be that the analog joysticks do not quite come back to the center when released, and thus send a value other than 0 to the robot. To see if this is the problem, wiggle the joystick around near 0 and see if you can get it to stop.
This is a common problem, and can be solved with a “deadzone” in your code. The joystick value should only be sent to the motors if it its absolute value is greater than say, 15. This will make the motors stop when the joystick is close to 0.
You will need to get some sort of programming software to do this. I figured it out by looking at the robotC sample programs. “Mecanum Drive with Deadzone Thresholds.c” is a good example, in the remote control folder of sample programs.
The joystick is probably outputting some small value when it is in the neutral position. I am not sure if the default code accounts for a deadband which will say it’s too small of a value coming out of the joystick don’t bother sending a value to the motor. Even if it has a deadband programmed in, it might be too narrow of a range for a mis-calibrated joystick sending a bigger value.
What might prove the theory is pairing that joystick with another Cortex to see if it does the same thing. If joystick #2 does it on Cortex #2 while Joystick #2 did not cause the movment, then joystick #1 is probably to blame and needs re-calibrating. (Don’t forget to pair joystick #2 back with cortex #2 when you’re done)
Do you have Robot C or are you only using the clawbot program out of the box that is on the robot from the factory? You could look in the debugger for what value the motor is getting in real time.
Do you have Robot C or are you only using the clawbot program out of the box that is on the robot from the factory? You could look in the debugger for what value the motor is getting in real time.
What others have said is correct, probably just a slightly miscalibrated joystick.
It’s probably premature, you are on step 1, this is perhaps step 5 or something like that, but also take a look at this thread that shows some of the next level programming that can be done with a clawbot.