We’re in a bit of a bind. We’ve managed to put together our drivetrain, using two motors per side, and tried to image the cRIO with our program from last year (time-constricted programmer). Whenever we try to drive, it seems like the gearbox motors fight against each other, but we’re not sure at this point if the problem is that or if we’ve got an issue with the motor controllers. As I’ve said earlier, our programmer is a bit busy at the moment and can’t seem to find the time to debug or even rewrite the program. We’ve tried switching motor inputs on the sidecar to match those from last year’s robot (which the code we’re using was made for).
We’ve tried asking him to just rewrite the code, but that doesn’t seem to get through to him.
The two motors on the left side of the drivetrain are connected to sidecar ports 2 and 4, whereas the two on the right are connected to ports 1 and 3.
I don’t have the code to put up at this moment but as soon as I can get it I’ll edit this and put it up for you guys. As for now, I just want to know if any programmer in the area of my school (3200 McCullough Avenue, San Antonio, Texas, 78201) can perhaps come over and teach some of our more available members to program in any language (we’re using Java at the moment, but any language is fine), we would really appreciate it.
I would use a PWM splitter from the KOP to connect he motors from each side to the same output on the DSC to make sure that both motors from each side are turning the same way at the same speed at the same time. Otherwise, there is a very serious danger of something breaking. Also, you don’t have to adjust the code for it!
Thanks, I was thinking of doing this from the start but I just got around to it. That solved our movement problem, but now we’ve got another two problems on our hands. The first one we can fix - when we move forward, one side moves forward while the other moves backwards. This behavior persists through all movements as expected. We can solve that.
But we’re also getting some issues with just driving. The left set of wheels will only move at very low speeds and behavior is unpredictable; sometimes it behaves as explained, and sometimes it just won’t move at all. The right side can handle a bit more speed, but when I push our control joystick all the way forward the wheels stop and there is a stripping sort of sound in the gearbox. An outside mentor has suggested that perhaps one or more of the gearbox motors’ keys may have slipped off. We’re looking into the issue now. Does anyone else have any other ideas?
This is actually an expected behavior on most drive trains. You need to reverse one side in code. Like you said it’s a very easy fix.
But we’re also getting some issues with just driving. The left set of wheels will only move at very low speeds and behavior is unpredictable; sometimes it behaves as explained, and sometimes it just won’t move at all. The right side can handle a bit more speed, but when I push our control joystick all the way forward the wheels stop and there is a stripping sort of sound in the gearbox. An outside mentor has suggested that perhaps one or more of the gearbox motors’ keys may have slipped off. We’re looking into the issue now. Does anyone else have any other ideas?
Make sure both motors in each gearbox are being powered. The easiest way to do this it to check the temperature of both motors after a long period of driving.
Since you have two motors per side you need to make sure that both motor controllers are driving the wheels in the same direction so that the motors are not fighting each other.
There are many ways to do this, one of the simplest ways is remove all the drivetrain motor controller breakers from the power distribution board.
Then plug in only one breaker, turn the robot on, and spin that side of the drive train with the joystick controls, and note which direction the wheel spins. Turn the bot off, Remove that breaker and plug in the breaker for the other motor controller for the same side of the drive train. Turn the robot back on, and drive the wheel again, noting the direction the wheel spins.
Repeat this for the other side as well. If you have a single side, where the wheel spins in opposite directions, then your motors are fighting each other, and you need to correct it.
If this is the case, and you do not have the option to fix it in code, you can safely invert the wires on the MOTOR side of the motor controller, to get the motor spinning in the correct orientation.
Note: Make sure you only invert the M side of the motor controller, because inverting the power side, will fry the motor controller.