Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Electrical (http://www.chiefdelphi.com/forums/forumdisplay.php?f=53)
-   -   Strange Jaguar/CIM Motor Behavior (http://www.chiefdelphi.com/forums/showthread.php?t=101760)

Cecil 02-02-2012 15:30

Re: Strange Jaguar/CIM Motor Behavior
 
Quote:

Originally Posted by DavidGitz (Post 1118558)
Sorry to knock you so quick, but this is not true. The invert selection in the Begin.vi is not dependent on one motor compared to another. Normally, if you have all the CIM motors wired with red+ and black- to each M+/M- terminals on each speed controller, you should not have to invert anything. The only reason that you would have to invert something is if you have your wiring reversed, which is dependent on the motor, not on which side the motor is on.

If you find that you do have to invert something and it's not because of the wiring, something else is wrong, which may or may not result in a negative impact on the mecanum drive.

It also depends on if the gearboxes are meant for 2 CIM motors. If you have 2 gearboxes mounted opposite another, and they are both toward the back of the gearbox, one will be inverted from another. It saves space that way, so there isn't one motor forward, and another back.

Cecil 02-02-2012 16:23

actually, I take that back. It won't be just one motor in the gearbox.

Try this: imagine a CIM motor with a wheel directly driven by it. Command that motor to go forward and put it on the floor. Naturally, it will go forward. Now, take that motor, and without changing the code or input, flip it 180 degrees. It now will go backwards. One side of the drivetrain needs to be inverted: whether it be software or by swapping the leads on one side. If not, the robot will simply spin in a circle.

DavidGitz 03-02-2012 08:43

Re: Strange Jaguar/CIM Motor Behavior
 
Quote:

Originally Posted by Cecil (Post 1118644)
actually, I take that back. It won't be just one motor in the gearbox.

Try this: imagine a CIM motor with a wheel directly driven by it. Command that motor to go forward and put it on the floor. Naturally, it will go forward. Now, take that motor, and without changing the code or input, flip it 180 degrees. It now will go backwards. One side of the drivetrain needs to be inverted: whether it be software or by swapping the leads on one side. If not, the robot will simply spin in a circle.

I assume most teams using Mecanum drive would have one motor per wheel. However, if they choose to use two motors attached to a gearbox usually the best solution would be to use a PWM Y Cable from the Digital Sidecar to each speed controller for that wheel module. Most dual input gearboxes in use in FRC (that I've seen at least) are setup to have the input gears drive the same gear in the gearbox, in which case it is important to ensure that each motor is going the same direction as the other along with the same speed (hence the Y Cable).

True, which is why you need to check the inverts in your begin, using the process outlined earlier. We don't need to invert anything as we are using Wormbox's and we swapped the side of the wormbox that the motor is attached to, to facilitate a symmetric layout so we are already "inverting" the output, see attached.

Jimbo2032 03-02-2012 09:28

Re: Strange Jaguar/CIM Motor Behavior
 
We have one motor per wheel, using the toughbox mini gearboxes. I didn't think about it before but does it matter which side the motor is mounted to? (left or right, I think I can figure out if the front/back is correct, haha) I wouldn't think that it would but it wouldn't be the first time I assumed incorrectly.

We ran some tests last night and got all of the wheels turning in the correct direction. We calibrated each jaguar according to the Getting Started Guide, and adjusted the inverted channels so that the robot can drive correctly.

I now have a question, is there a function somewhere in the software/firmware that limits the speed or response of a motor when it is traveling in reverse? I ask this because it seems that the PWM channels that are inverted in the Begin.vi seem to lag behind the motors that are not inverted.

I have been thinking about it all night and morning and that is the only explanation I can come up with. This afternoon I will try to turn off the inversion on all channels and just hook up two of the motor leads reversed. I guess that would tell me if it is a function of the software.

Another thing, has anyone else found that the calibration procedures in the manual seem a bit minimalist? It took me several tries to calibrate the Jaguars because I did not realize there was a timeout in the calibration mode. I ended up just doing one wheel at a time, a bit of a pain, glad we only have four wheels...

DavidGitz 03-02-2012 11:48

Re: Strange Jaguar/CIM Motor Behavior
 
Quote:

Originally Posted by Jimbo2032 (Post 1119097)
Another thing, has anyone else found that the calibration procedures in the manual seem a bit minimalist? It took me several tries to calibrate the Jaguars because I did not realize there was a timeout in the calibration mode. I ended up just doing one wheel at a time, a bit of a pain, glad we only have four wheels...

The reason you are seeing some motors going faster/slower than the others may be due to how you calibrated your speed controllers. The factory calibration should work perfectly for what you are doing. The reason they offer that feature is for use in other systems, such as RC control systems where the PWM timing is non-standard. From the TI Jaguar FAQ:
Quote:

Q38 Do I need to calibrate the Servo (PWM) interface?
A
It depends. The motor controller has a calibration mode, and the need to calibrate depends on the Servo
(PWM) signal range generated by the robot controller.
For FRC users, the answer is probably not if you are using the cRIO system and a new motor controller.
The default parameters of the motor controller are tuned for use with the cRIO. The calibration mode is
provided if you want to use the motor controller with another source of Servo (PWM) signal that does not
have the same range of pulse widths (for example, an older robot controller). Or, if you have calibrated
your Jaguar (MDL-BDC) from a different source and move it back to a cRIO system, you must recalibrate.
I would reset the calibration to the factory default settings (as seen here) and see if you still have this problem, along with making sure that the actual value going into the motor output in your code is going 1:-1 on each motor.

Al Skierkiewicz 03-02-2012 12:20

Re: Strange Jaguar/CIM Motor Behavior
 
Jimbo,
One of the things you may be observing is motor bias. The CIMs run pretty close to the same speed in both directions. Other motors like the FP may run faster in one direction than the other. You will need to compensate in software for any motors that have this issue. Calibration should be performed for only one motor at a time.

David,
It is my understanding that the calibration procedure is merely giving you full range of output for extremes in your joysticks. The joysticks and handheld controllers use very cheap pots and often will not produce full throttle range at each extreme of the joystick. The calibrate feature then make the extremes produce full throttle output. That is the reason that calibration calls for you to send full forward, full reverse and neutral commands to the controller.

DavidGitz 03-02-2012 12:39

Re: Strange Jaguar/CIM Motor Behavior
 
Quote:

Originally Posted by Al Skierkiewicz (Post 1119187)
David,
It is my understanding that the calibration procedure is merely giving you full range of output for extremes in your joysticks. The joysticks and handheld controllers use very cheap pots and often will not produce full throttle range at each extreme of the joystick. The calibrate feature then make the extremes produce full throttle output. That is the reason that calibration calls for you to send full forward, full reverse and neutral commands to the controller.

I may want to insert the infamous "You know what assuming gets..." quote here, but I am assuming that they are using the KOP Joysticks, which is what we always use. I am not saying that this doesn't happen on the KOP Joysticks, in my experience it is pretty negligible. While your statement is very true I would verify that is the case before running the calibration procedure using the default factory settings. Since they performed it right away (assuming as per the wording in their post) it is more likely (at least to me) that they didn't go full forward/full backward/neutral during the calibration process. The bigger issue in my experience is the joystick not self-centering "perfectly" so we normally put a 2-5% deadband on each axis and we have no problems after that.

In my experience using Victor's and Jaguars, it is somewhat common (we've had to perform the calibration process all of 5 times over my 6 years) to need to calibrate a Victor but have never needed to calibrate a Jaguar, independent on their usage and implementation. However, your mileage may vary.

Al Skierkiewicz 03-02-2012 13:34

Re: Strange Jaguar/CIM Motor Behavior
 
David,
We compensate in software.


All times are GMT -5. The time now is 05:59.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi