My partner team is having an issue and quite a few of us put our heads together in an attempt to find the solution.
The is with the motor control. 4 motors on the drive are connected via a Y-cable, 2 motors in each Y-cable. When the motors are connected into individual ports, say port 2 and port 3, the motors run fine. The joystick control works, and everything’s nice and dandy.
When we connect the motors with a Y-cable, one setup of the y-cables makes the motors do nothing, and then when we flip the PMW connections, the wheels take off and they do not stop, and joystick control does not seem to work.
We have tried 3 different y cables, we have tried using a different laptop for code (although I’m not sure how that would help), and we’ve tried simplifying our code to see if somehow -127 and 127 are being added to the port value.
Unfortunately nothing above has been fruitful.
Any insight would be appreciated.
did you try using a diffrent micro controler
No we did not, although I’m not entirely sure that’s the issue.
I will pass this on to my partner team and see if we have any success.
Any other suggestions?
no you already did everything i would have done
If you plug the motors directly into the ports on the controller and everything works as it is supposed to, you have a problem with either your Y-cable, or with how you are plugging the Y-cable into the controller or motors into the Y-cable. It cannot be your controller, programming PC, or code. Think about it – you have isolated the only new thing in the system, which is the Y-cable. 99 times out of 100 it’s going to be a plug-in polarity problem.
You have tested all four drive motors plugged directly into your controller, right? Otherwise, you might have motor/drive train issues in the motors you haven’t tested.
Backwards inserted Y cables has been the problem 99% if the time with our robots using them.
I was under the belief that if a Y-cable is inserted backwards, then it simply will move in the other direction. Not keep moving the motors…
Nope. Strange stuff happens – it doesn’t just run backwards.
Then I must be mistaken, and that’s our issue. Luckily the solution was easy to implement and we’re set to competition in roughly 1 hour. :D.
The Vex device labeled “Motor”. contains both a rotating machine AND some control circuitry. The direction and speed of the shaft’s rotation is controlled by the width of a pulse that comes from the microcontroller and is decoded by the circuitry attached to that rotating part of the “Motor”.
Read, Read, Read, Read the documentation that come with these devices.
The wires on the PWM cables are color-coded so that you can avoid plugging them in “backwards”, not so that you can purposefully plug them in backwards.
I understand how a motor works. I was just under the incorrect impression that plugging a Y-cable in backwards would still work properly, but just turn the motor in the opposite direction.
OK - During the time that you were under that impression, I believe that you (and plenty of other folks) had forgotten how THIS motor works.
My goal isn’t focusing on your one “oops”. For every one you have enjoyed, I sure we can easily find one or two that I have.
My goal is to shine a light on the usefulness of everyone continuously investing a little time in dispelling assumptions, by studying how the Vex devices work. No matter how much I or anyone else knows about them, or about the general field of hobby robotics, there is always more to learn.