Go to Post My favorite quote from my 4 year old daughter is, "if it works, who cares?" - drwisley [more]
Home
Go Back   Chief Delphi > Technical > Electrical
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 02-02-2012, 08:14
Jimbo2032 Jimbo2032 is offline
Registered User
AKA: James Boring
FRC #3998 (BA Bots)
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2012
Location: United States
Posts: 7
Jimbo2032 is an unknown quantity at this point
Strange Jaguar/CIM Motor Behavior

My team is having some trouble getting our robot to drive in a predictable fashion. We are a first year FIRST team, so please bear with me. We implemented Mecanum wheels with 4 CIM motors being driven by Jaguars (PWM). Our code is written in LABView.

Going forward and backward works as it should, however, when we attempt to translate left or right the robot wants to rotate about it center axis. Upon inspection of the code the joystick inputs X and Y were wired to the appropriate terminals on the holomorphic .vi (cartesian).

The symptoms that I see are that the motors are not all engaging at the same time or the same speed. I feel that we need some type of feedback control loop but I wanted to ask here before we expend that time and effort. Could it be that I am missing something? And if so, any suggestions no matter how simple or mundane will be appreciated.

Thanks in advance for your help!

Jimbo
  #2   Spotlight this post!  
Unread 02-02-2012, 08:22
Unsung FIRST Hero
Al Skierkiewicz Al Skierkiewicz is offline
Broadcast Eng/Chief Robot Inspector
AKA: Big Al WFFA 2005
FRC #0111 (WildStang)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1996
Location: Wheeling, IL
Posts: 10,798
Al Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond repute
Re: Strange Jaguar/CIM Motor Behavior

James,
If you give a forward command to one side and reverse command to the other side (assuming identical throttle values) then the robot will turn on it's center axis. If you want to turn on an axis outside of the robot, only drive forward on the side opposite the direction you want to turn. If you want to turn in an arc, simply adjust the throttle values to the two sides independently.
__________________
Good Luck All. Learn something new, everyday!
Al
WB9UVJ
www.wildstang.org
________________________
Storming the Tower since 1996.
  #3   Spotlight this post!  
Unread 02-02-2012, 08:52
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Strange Jaguar/CIM Motor Behavior

Quote:
Originally Posted by Jimbo2032 View Post
Going forward and backward works as it should, however, when we attempt to translate left or right the robot wants to rotate about it center axis.
Do you mean it rotates instead of moving sideways, or that it moves sideways but doesn't maintain its orientation while doing so?

What does the robot do when you command it to turn in place?

Are you certain the mecanum wheels are mounted properly? The diagonal rollers should form a diamond shape where they contact the floor; they will look sort of like an X when viewed from above. If one or more of them is backwards, the turn and strafe behavior will not be as expected.

Are you certain you have wired the speed controllers for the four motors to the proper PWM connectors? Getting a couple of them swapped would really confuse things.
  #4   Spotlight this post!  
Unread 02-02-2012, 09:27
DavidGitz's Avatar
DavidGitz DavidGitz is offline
Lead Technical Advisor
FRC #1208 (MeTool Brigade)
Team Role: Coach
 
Join Date: Dec 2006
Rookie Year: 1996
Location: O'Fallon, IL
Posts: 341
DavidGitz has much to be proud ofDavidGitz has much to be proud ofDavidGitz has much to be proud ofDavidGitz has much to be proud ofDavidGitz has much to be proud ofDavidGitz has much to be proud ofDavidGitz has much to be proud ofDavidGitz has much to be proud of
Send a message via AIM to DavidGitz Send a message via MSN to DavidGitz Send a message via Yahoo to DavidGitz
Re: Strange Jaguar/CIM Motor Behavior

Besides what Alan said, here is how we make sure the wiring and software are correct, assuming you are using 2 Joysticks for control, one for forward/backward and strafe left/right and one for rotation:

1. Put the robot on blocks so the wheels are free to rotate.
2. On the Driver Station, make sure that Joysticks 1&2 are assigned to the correct port in the Setup Tab: We prefer that the strafe Joystick is #1 and on the left, and the rotate joystick is #2 and is on the right. Click any button on the Joystick and that will tell you which one is which, and you can click and drag the joysticks to re-order if you need to.
3. Enable your robot with the Mecanum code running. Slowly move Joystick #1 to a small value forward and hold it there. Check to make sure all the wheels are rotating and rotating in a forward direction. If any wheel is rotating the wrong direction, either change the wires or change the motor inverts in the Begin.vi
4. Go forward and backward full range to verify that everything mechanical is rotating correctly without any binding.
5. Use Joystick #2 and rotate to the left. This should make the left side of the robot's wheels rotate backwards and the right side move forwards. If this is incorrect your speed controller's PWM cables or software is using the wrong motors.
6. From what we've been able to tell, if all the above steps pass the robot should strafe correctly. So put it on the floor and verify that it moves correctly still. If there is a problem with the robot now, it is more likely a mechanical issue, such as binding, wheels are not touching the ground and/or bad weight distribution.
__________________
  #5   Spotlight this post!  
Unread 02-02-2012, 11:12
Jimbo2032 Jimbo2032 is offline
Registered User
AKA: James Boring
FRC #3998 (BA Bots)
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2012
Location: United States
Posts: 7
Jimbo2032 is an unknown quantity at this point
Re: Strange Jaguar/CIM Motor Behavior

David,

When working on he robot last night I had it up on blocks at one point and did what you suggested. I don't remember specifically the results so I will try again tonight and document the results. I do remember though that it seemed as though there were some wheels that lagged a little.

In that I mean that when I pushed slightly forward on the stick some wheels would begin to rotate before the others. Once all the wheels were rotating it was in the correct direction (forward) but it still seemed that some were rotating slightly faster.

I would like to think that this is a software issue rather than a hardware (electrical) or mechanical issue, but I am not sure. Do I need to add some kind of feedback to my system to have all wheels moving at the same speed?

If it is mechanical, I would suspect a problem in the gearbox or the wheels themselves. How much torque do I need to use to tighten the wheels? Should the rollers be able to spin freely, or should they have some resistance, or should they pretty much be bound up and hard to turn?

Sorry to so many questions, I just want to have as many leads as possible for my team when we meet tonight.

P.S. We know that the wheels are mounted in the correct positions, we fixed that problem last night, haha.
  #6   Spotlight this post!  
Unread 02-02-2012, 11:20
Unsung FIRST Hero
Al Skierkiewicz Al Skierkiewicz is offline
Broadcast Eng/Chief Robot Inspector
AKA: Big Al WFFA 2005
FRC #0111 (WildStang)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1996
Location: Wheeling, IL
Posts: 10,798
Al Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond repute
Re: Strange Jaguar/CIM Motor Behavior

James,
It is also possible that the speed controllers do not match. There is a calibrate function to allow you to match joysticks to controllers. This would be the case if you are using the single joystick to drive. This can be handled in software and many teams take this approach. When performing the calibration, I recommend removing all breakers except the controller you are calibrating.
__________________
Good Luck All. Learn something new, everyday!
Al
WB9UVJ
www.wildstang.org
________________________
Storming the Tower since 1996.
  #7   Spotlight this post!  
Unread 02-02-2012, 11:21
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Strange Jaguar/CIM Motor Behavior

Quote:
Originally Posted by DavidGitz View Post
6. From what we've been able to tell, if all the above steps pass the robot should strafe correctly.
Not necessarily. If the front and back PWM controls are swapped on one side, the robot will probably just bounce in place trying to squeeze or stretch itself sideways. If they're swapped on both sides, the robot will probably strafe in the wrong direction, and trying to turn while strafing will be very entertaining.

The first thing to do is make sure the wheels are installed in the proper orientation. The second thing is to make sure the PWM definitions in software match the wiring in hardware. Then you can determine whether or not any of the motor directions need to be inverted.
  #8   Spotlight this post!  
Unread 02-02-2012, 11:40
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Strange Jaguar/CIM Motor Behavior

Quote:
Originally Posted by Jimbo2032 View Post
In that I mean that when I pushed slightly forward on the stick some wheels would begin to rotate before the others. Once all the wheels were rotating it was in the correct direction (forward) but it still seemed that some were rotating slightly faster.
One thing that can cause that is telling the software to control a Jaguar but actually using a Victor, or vice versa. The factory default PWM "neutral" value differs between the two types of speed controller.

Quote:
Should the rollers be able to spin freely, or should they have some resistance, or should they pretty much be bound up and hard to turn?
The more freely they spin, the better will be your robot's ability to move sideways. The more resistance they have, the more force you'll be able to apply in the forward direction before the wheels slip, but strafing will suffer. If they're too hard to turn, you're essentially using a bumpy and expensive traction wheel.
  #9   Spotlight this post!  
Unread 02-02-2012, 11:52
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,125
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: Strange Jaguar/CIM Motor Behavior

Quote:
Originally Posted by Jimbo2032 View Post
Should the rollers be able to spin freely, or should they have some resistance, or should they pretty much be bound up and hard to turn?
To get ideal "mecanum" behavior, you want the rollers to spin freely but have as little axial free play as possible.

If the rollers don't spin freely, it will affect the ability to strafe, and to some extent the vehicle rotation (turning) will suffer also.

  #10   Spotlight this post!  
Unread 02-02-2012, 12:21
Jimbo2032 Jimbo2032 is offline
Registered User
AKA: James Boring
FRC #3998 (BA Bots)
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2012
Location: United States
Posts: 7
Jimbo2032 is an unknown quantity at this point
Re: Strange Jaguar/CIM Motor Behavior

Okay, our rollers are pretty tight once the axles (screws) are tightened down enough so that the brass piece is touching both sides of the wheel plates. *I am using the AndyMark 8" Mecanums by the way* I think we will try lubing up the axles to get the rollers to spin more freely. Does anyone see a problem with this?
  #11   Spotlight this post!  
Unread 02-02-2012, 12:29
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,125
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: Strange Jaguar/CIM Motor Behavior

Quote:
Originally Posted by Jimbo2032 View Post
the axles (screws) are tightened down enough so that the brass piece is touching both sides of the wheel plates
You're probably gonna want to back off a bit on the axle nuts and live with a bit of free play so the rollers spin freely. For each roller, if you push the roller axially until it stops and then continue applying some axial force while trying to turn it, does it turn smoothly? Or does it bind up?


Last edited by Ether : 02-02-2012 at 12:32.
  #12   Spotlight this post!  
Unread 02-02-2012, 13:22
DavidGitz's Avatar
DavidGitz DavidGitz is offline
Lead Technical Advisor
FRC #1208 (MeTool Brigade)
Team Role: Coach
 
Join Date: Dec 2006
Rookie Year: 1996
Location: O'Fallon, IL
Posts: 341
DavidGitz has much to be proud ofDavidGitz has much to be proud ofDavidGitz has much to be proud ofDavidGitz has much to be proud ofDavidGitz has much to be proud ofDavidGitz has much to be proud ofDavidGitz has much to be proud ofDavidGitz has much to be proud of
Send a message via AIM to DavidGitz Send a message via MSN to DavidGitz Send a message via Yahoo to DavidGitz
Re: Strange Jaguar/CIM Motor Behavior

Quote:
Originally Posted by Alan Anderson View Post
Not necessarily. If the front and back PWM controls are swapped on one side, the robot will probably just bounce in place trying to squeeze or stretch itself sideways. If they're swapped on both sides, the robot will probably strafe in the wrong direction, and trying to turn while strafing will be very entertaining.

The first thing to do is make sure the wheels are installed in the proper orientation. The second thing is to make sure the PWM definitions in software match the wiring in hardware. Then you can determine whether or not any of the motor directions need to be inverted.
Very true Alan, I meant to put in a step for checking the correct strafing direction but I forgot apparently.

Jimbo - The "lag" you are seeing could be coming from several different sources. I would look through the Diagnostics tab Error messages and see what's appearing there, verify you are sending the appropriate values to the Mecanum drive VI using probes/indicators. If you have other code in your project create a new default project, add only the code you need to drive and see if you still have the lag.

If that's not an issue you may have some binding. For the wheel that is slower see what could be causing it. We had some issues with the 6" Mecanum wheels and the AM Wormbox's due to very little clearance with the chain sliding across the mecanum plate, along with the Wormbox itself rotating towards the wheel and making the chain bind and then fall off. Only with proper bracing, alignment and spacing are we able to drive effectively, definitely not a "slap together" system.

If you can't find the problem you can definitely post your code and pictures of your drive-train here so we can help more.
__________________
  #13   Spotlight this post!  
Unread 02-02-2012, 14:10
Cecil's Avatar
Cecil Cecil is offline
Registered User
AKA: Alex Hummel
FRC #2010 (Lightning Bots)
Team Role: Mentor
 
Join Date: Dec 2008
Rookie Year: 2006
Location: Champion
Posts: 343
Cecil is a splendid one to beholdCecil is a splendid one to beholdCecil is a splendid one to beholdCecil is a splendid one to beholdCecil is a splendid one to beholdCecil is a splendid one to beholdCecil is a splendid one to behold
Re: Strange Jaguar/CIM Motor Behavior

This happened for us at one time too. Look in Begin.vi and make sure that the motors are inverted correctly. Make sure both on the left side are the same and both on the right side are the same. If they aren't, it will cause this, but will still make it go forward.
__________________
I'm right 90% of the time, so why worry about the other 3%?
  #14   Spotlight this post!  
Unread 02-02-2012, 14:35
DavidGitz's Avatar
DavidGitz DavidGitz is offline
Lead Technical Advisor
FRC #1208 (MeTool Brigade)
Team Role: Coach
 
Join Date: Dec 2006
Rookie Year: 1996
Location: O'Fallon, IL
Posts: 341
DavidGitz has much to be proud ofDavidGitz has much to be proud ofDavidGitz has much to be proud ofDavidGitz has much to be proud ofDavidGitz has much to be proud ofDavidGitz has much to be proud ofDavidGitz has much to be proud ofDavidGitz has much to be proud of
Send a message via AIM to DavidGitz Send a message via MSN to DavidGitz Send a message via Yahoo to DavidGitz
Re: Strange Jaguar/CIM Motor Behavior

Quote:
Originally Posted by Cecil View Post
This happened for us at one time too. Look in Begin.vi and make sure that the motors are inverted correctly. Make sure both on the left side are the same and both on the right side are the same. If they aren't, it will cause this, but will still make it go forward.
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.
__________________
  #15   Spotlight this post!  
Unread 02-02-2012, 15:10
pfreivald's Avatar
pfreivald pfreivald is offline
Registered User
AKA: Patrick Freivald
FRC #1551 (The Grapes of Wrath)
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 2001
Location: Naples, NY
Posts: 2,304
pfreivald has a reputation beyond reputepfreivald has a reputation beyond reputepfreivald has a reputation beyond reputepfreivald has a reputation beyond reputepfreivald has a reputation beyond reputepfreivald has a reputation beyond reputepfreivald has a reputation beyond reputepfreivald has a reputation beyond reputepfreivald has a reputation beyond reputepfreivald has a reputation beyond reputepfreivald has a reputation beyond repute
Re: Strange Jaguar/CIM Motor Behavior

Another simple thing to check is the gain on your joysticks (if your joysticks have gain). If they're off, things can get rather wonky rather fast. Set them to where you need them, and then hot glue them in place!
__________________
Patrick Freivald -- Mentor
Team 1551
"The Grapes of Wrath"
Bausch & Lomb, PTC Corporation, and Naples High School

I write books, too!
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


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

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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