Go to Post The fact of the matter comes down to this: No matter what you are interested in, you can always encourage others. - Amanda Morrison [more]
Home
Go Back   Chief Delphi > Technical > Technical Discussion
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 14-02-2007, 16:02
svanderlugt svanderlugt is offline
Registered User
FRC #1677
 
Join Date: Feb 2007
Location: Kalamazoo MI
Posts: 2
svanderlugt is an unknown quantity at this point
Question Robot won't go straight

Our robot has 2 cim motors attached to wheels via chain and sproket. We have used the default code and the robot will not go straight, it turns in one direction weather we go forward or backwards! Is anyone else having this problem? It could be the transmission between the motors and the chain, and the chains on each side are almost the same. We will continue to troubleshoot.
Thanks,

[b]Quantum Ninjas[b]
  #2   Spotlight this post!  
Unread 14-02-2007, 16:09
GBIT's Avatar
GBIT GBIT is offline
Lexantologist/Team Lead
AKA: Jared
FRC #0811 (Cardinals)
Team Role: Mechanical
 
Join Date: Jan 2006
Rookie Year: 2005
Location: Worcester, MA
Posts: 252
GBIT is just really niceGBIT is just really niceGBIT is just really niceGBIT is just really niceGBIT is just really nice
Send a message via AIM to GBIT
Re: Robot won't go straight

we found that the motor have a directional preferance and that they spin at different rates in either foward or backwards. just an idea

also

make sure that one of your trasmissions is not binding or anything like that. just curous are you using the Banebots transmissins?
__________________
-Mentor-
-WPI '13-
-Former Team Lead-
-Past Driver-

  #3   Spotlight this post!  
Unread 14-02-2007, 16:09
AV_guy007's Avatar
AV_guy007 AV_guy007 is offline
Registered User
AKA: Sam
FRC #0177 (bobcats)
Team Role: Leadership
 
Join Date: Jan 2006
Rookie Year: 2006
Location: South Windsor
Posts: 185
AV_guy007 has much to be proud ofAV_guy007 has much to be proud ofAV_guy007 has much to be proud ofAV_guy007 has much to be proud ofAV_guy007 has much to be proud ofAV_guy007 has much to be proud ofAV_guy007 has much to be proud ofAV_guy007 has much to be proud ofAV_guy007 has much to be proud of
Re: Robot won't go straight

are you using a 1 joystick drive or 2?
if it is 1 joystick it could be that "forward" on your robot actual requires one side to turn backwards while the other turns forward.
__________________
Team 177
bobcat robotics
BLUE ALLIANCE CREW MEMBER

Next event attending: Kickoff 08- Manchester NH With TBA
  #4   Spotlight this post!  
Unread 14-02-2007, 16:17
Donut Donut is offline
The Arizona Mentor
AKA: Andrew
FRC #2662 (RoboKrew)
Team Role: Engineer
 
Join Date: Mar 2005
Rookie Year: 2004
Location: Goodyear, AZ
Posts: 1,304
Donut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond repute
Re: Robot won't go straight

Try reversing the polarity for the motors on one side of the robot, then reverse that motors output in code. This sometimes helps.

Other than that, I know you can correct it with a gyro and some programming. It's a good project for new programmers since it's a pretty easy introduction to doing control loops. This late in the build season though it's probably not feasible.
__________________
FRC Team 498 (Peoria, AZ), Student: 2004 - 2007
FRC Team 498 (Peoria, AZ), Mentor: 2008 - 2011
FRC Team 167 (Iowa City, IA), Mentor: 2012 - 2014
FRC Team 2662 (Tolleson, AZ), Mentor: 2014 - Present
  #5   Spotlight this post!  
Unread 14-02-2007, 16:50
efoote868 efoote868 is offline
foote stepped in
AKA: E. Foote
FRC #0868
Team Role: Mentor
 
Join Date: Mar 2006
Rookie Year: 2005
Location: Noblesville, IN
Posts: 1,416
efoote868 has a reputation beyond reputeefoote868 has a reputation beyond reputeefoote868 has a reputation beyond reputeefoote868 has a reputation beyond reputeefoote868 has a reputation beyond reputeefoote868 has a reputation beyond reputeefoote868 has a reputation beyond reputeefoote868 has a reputation beyond reputeefoote868 has a reputation beyond reputeefoote868 has a reputation beyond reputeefoote868 has a reputation beyond repute
Re: Robot won't go straight

last ditch effort, try calibrating your victors.
__________________
Be Healthy. Never Stop Learning. Say It Like It Is. Own It.

Like our values? Flexware Innovation is looking for Automation Engineers. Check us out!
  #6   Spotlight this post!  
Unread 14-02-2007, 17:12
tdlrali tdlrali is offline
Registered User
FRC #0469 (Las Guerrillas)
Team Role: Programmer
 
Join Date: Sep 2006
Rookie Year: 2006
Location: MI
Posts: 377
tdlrali has much to be proud oftdlrali has much to be proud oftdlrali has much to be proud oftdlrali has much to be proud oftdlrali has much to be proud oftdlrali has much to be proud oftdlrali has much to be proud oftdlrali has much to be proud of
Re: Robot won't go straight

Is is most likely caused by the way motors are built. They are optimized to turn one way (the brushes inside are slightly angled). If you mount both motors with the body pointing towards the inside and the output pointing away from the robot, one will be turning the opposite way than the other. The one that is turning "backwards" will turn slower than the other one.

The only way (that I know of) to correct this is programming: Scale the faster side down a little bit. You will loose a little bit of speed though. So it's up to you, easier to drive vs. performance.
  #7   Spotlight this post!  
Unread 14-02-2007, 19:08
Justin M. Justin M. is offline
Mechanical/Driver
FRC #0321 (RoboLancers)
Team Role: Mechanical
 
Join Date: Jan 2005
Rookie Year: 2005
Location: Philadelphia, PA
Posts: 310
Justin M. is on a distinguished road
Send a message via AIM to Justin M.
Re: Robot won't go straight

The CIM motors have neutral timing, so they don't favor one direction with slightly less RPM's.

You always have to reverse the polarity of one side of the motors driving the thing, either in the programming or by just simply physically reversing the polarity from the Victor. That would explain why your robot wont go straight. If the left side motors are turning left, the right side motors will turn left as well, but turning left on the left side motors means that turning left on the right side motors (which are inverted), will actually appear to be turning right, due to how it's mounted on your chassis.
__________________
Team 321: CHS RoboLancers - Drexel University, CHS Alumni Assn., SDP, Philadelphia Motorsports, Lima Corperation
  #8   Spotlight this post!  
Unread 14-02-2007, 20:08
kmcclary's Avatar
kmcclary kmcclary is offline
Founder 830/1015;Mentor 66/470/1502
FRC #0470 (Alpha Omega Robotics)
Team Role: Engineer
 
Join Date: Aug 2001
Rookie Year: 1994
Location: Ann Arbor, MI
Posts: 491
kmcclary has a reputation beyond reputekmcclary has a reputation beyond reputekmcclary has a reputation beyond reputekmcclary has a reputation beyond reputekmcclary has a reputation beyond reputekmcclary has a reputation beyond reputekmcclary has a reputation beyond reputekmcclary has a reputation beyond reputekmcclary has a reputation beyond reputekmcclary has a reputation beyond reputekmcclary has a reputation beyond repute
Re: Robot won't go straight

Quote:
Originally Posted by svanderlugt View Post
Our robot has 2 cim motors attached to wheels via chain and sproket. We have used the default code and the robot will not go straight, it turns in one direction weather we go forward or backwards! Is anyone else having this problem? It could be the transmission between the motors and the chain, and the chains on each side are almost the same. We will continue to troubleshoot.
Thanks,

[b]Quantum Ninjas[b]
Is it SPINNING, or just making a gentle "arc" to one side?

(A) IF spinning: Reverse the polarity on one motor. Remember that one runs forward and one runs backwards on a standard outward facing differential drive, so one will have the red lead on the Victor's M+, whereas the other will have the black lead on it (and vice versa for the M- connection).

(B) IF arcing in a gentle "S" curve (arc one way forward, the other backward): You have "motor timing" issues, where the motor favors one direction over the other. Others have posted that the CIMs are not SUPPOSED to be "timed" (favor one direction), but in reality they always seem to favor one way or the other slightly.

This can be compensated for via several methods: a power factor lookup table to balance the power to each side based on command, closed loop steering control with the gyro (slave one motor's speed to the other via integrating the gyro data - see the Whitepapers or kevin.org for more information), mechanical coupling of the two sides (tough to do without designing a clutch), or a different drivetrain geometry, like skid steer 4WD or 6WD (also tough to change now, since we're in week six!)

(C) If it is favoring the SAME side both forward and backward: You either have one motor more powerful than the other (CIM output is rated +/- 10 percent per copy), or the drivetrain is BINDING more on one side than the other. Check for binding first. That is the most common reason when this occurs. Check for: binding in the CIM-Transmission coupling (VERY common source!), for misalignment in gear and/or sprocket-chain sets, binding wheel bearings, and if live shafts are used, defective/dry pillow blocks or a misaligned/bent shaft.

Also be sure that the far end of the motor/gearbox shaft is supported with a pillow block! If it's not, chain tension can bind up a gearbox.

If you suspect motor-to-motor variance, try a different combination of CIMs.

(D) It COULD be a programming problem, but that's unlikely. You can easily disprove ANY variance in the control system & programming is responsible, by simply switching which side each Victor controls (IOW, swap motor wiring to the Victors, keeping everything else identical). This is an easy test to do. If the symptom shifts sides, then you actually have a programming or electrical problem! If not, then it's a motor, transmission, drivetrain, wheel, or other mechanical problem.


I hope this helps you diagnose your problem.

- Keith McClary
Chief Engineer, Team 1502 "Technical Difficulties"
__________________
Keith McClary - Organizer/Mentor/Sponsor - Ann Arbor MI area FIRST teams
ACTI - Automation Computer Technologies, Inc. (Sponsoring FIRST teams since 2001!)
MI Robot Club (Trainer) / GO-Tech Maker's Club / RepRap-Michigan) / SEMI CNC Club
"Certifiably Insane": Started FIVE FRC teams & many robot clubs (so far)!
2002: 830 "Rat Pack" | 2003-5;14: 1015;1076 "Pi Hi Samurai" | 2005-6: 1549 "Washtenuts"/"Fire Traxx"
2005-(on): 1502 "Technical Difficulties" | 2006-(on): FIRST Volunteer!
2009-(on): 470 "Alpha Omega" | WAFL | Sponsor & "Floating Engineer" for MI Dist 13 (Washtenaw Cnty)
2011: 3638 "Tigertrons" | 2013-(on): 4395 "ViBots" | 2014-(on) 66 "Grizzlies"
"Home" Teams: 66, 470, 1076, 1502, 4395
Local FIRST alumni at or coming to Ann Arbor (UM/EMU/WCC/Cleary)?
...We Want YOU as a Mentor! Please email me for info!
Support CDF Reputation - If a posting helped, thank 'em with rep points!
"It must be FRC build season when your spouse and children become 'Action Items 8 & 9'..."
  #9   Spotlight this post!  
Unread 14-02-2007, 23:50
Fritztopher's Avatar
Fritztopher Fritztopher is offline
Registered User
AKA: Fritz
FRC #1418 (Vae Victus)
Team Role: Scout
 
Join Date: Mar 2005
Rookie Year: 2005
Location: Falls Church, VA
Posts: 9
Fritztopher is on a distinguished road
Send a message via AIM to Fritztopher
Re: Robot won't go straight

Well, I can't tell what your problem is, but I can tell you what our problem was when we discovered our robot was listing slightly. It turned out to be what we termed "victor bias," though we never really discovered whether the victor or the robot controller was the problem. The problem turned out to be that for equal and opposite PWM values (such as 100 and 154) the victors were not outputting the same amount of power. We ended up fixing it with a lookup table so that the victors would output the same power for opposite PWM values (mirrored at 127), but it took us a few days to work out all the problems.

For more discussion, see this thread
http://www.chiefdelphi.com/forums/sh...=victor+bia s

In particular, read Mike Betts' post and check out his graph
http://www.chiefdelphi.com/forums/at...achmentid=3100

We collected our own data and got a graph that looked a lot like his. What's interesting about that graph is that the center of the "flat zone" is NOT symetric about 127, but more like 130-132. So adding 25 to 127 will give a power value (and hence an rpm) that is substantially different from what you get by subtracting 25. The curve is very steep along there, and a couple PWM values change will really change the power.
__________________
Hmmm....
  #10   Spotlight this post!  
Unread 15-02-2007, 13:09
mluckham's Avatar
mluckham mluckham is offline
Registered User
FRC #0758 (Sky Robotics)
Team Role: Mentor
 
Join Date: Mar 2006
Rookie Year: 2006
Location: Ontario, Canada
Posts: 116
mluckham will become famous soon enoughmluckham will become famous soon enough
Re: Robot won't go straight

So if you push the joystick straight forward and give the identical values to the PWMs on both sides, the robot will curve (say) left going forward, and right in reverse.

Whether the motors "prefer" to go more easily one direction than another, you have different friction to overcome in the drive mechanisms on each side of the robot, or there is 'Victor bias', you have to do SOMETHING!

We have used this test:

Record the PWM output values required to start the left side wheels moving, in both forward and backward directions. Ours are something like 127+8 and 127-15.

Repeat on the right side. We found 127-8 and 127+15.

Allowing for the sign, it looks symmetrical doesn't it?

To solve this problem simply, just add a constant of 15-8 = 7 to the PWM on the slower side to make the motors spin the same. When going forward, add the constant to one wheel, in reverse add the constant to the other one.
  #11   Spotlight this post!  
Unread 15-02-2007, 22:42
gnirts gnirts is offline
Suspicious pointer conversion
AKA: Robinson Levin
FRC #1648 (The Gearbox Gangstaz)
Team Role: Programmer
 
Join Date: Jan 2006
Rookie Year: 2005
Location: ATL
Posts: 116
gnirts will become famous soon enough
Re: Robot won't go straight

Quote:
Originally Posted by mluckham View Post
To solve this problem simply, just add a constant of 15-8 = 7 to the PWM on the slower side to make the motors spin the same.
Or center whatever function you use the scale the joysticks to PWMs on 131 and not 127. The loss at the ends doesn't really matter, the difference between a command of 250 and 254 is negligable.

The solution we took is to have a Set_Left_Motor() and Set_Right_Motor() function where if you pass in x, it sets (for example) pwm01 to pwm01_min_forward+x if x > 0 or pwm_min_reverse-x if x < 0, where pwm01_min_forward and _reverse are around 127+15 and 127-8. I don't have the actual values in front of me but we adjusted this to make min_forward and min_reverse the values that actually make the robot itself move, not just the wheels turn under no load.

Robinson Levin
  #12   Spotlight this post!  
Unread 15-02-2007, 23:54
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: Robot won't go straight

Quote:
Originally Posted by gnirts View Post
...the difference between a command of 250 and 254 is negligable.
According to IFI (http://www.ifirobotics.com/forum/viewtopic.php?p=883), the difference between Victor outputs for pwm inputs of 250 and 254 is actually nonexistent. It hits 100% output at about 232. That Q&A response also seems to confirm that the forward/reverse response is asymmetric.
  #13   Spotlight this post!  
Unread 16-02-2007, 15:20
Bio's Avatar
Bio Bio is offline
Registered User
AKA: Brian Dellon
None #1389 (Worst Case Scenario)
Team Role: Programmer
 
Join Date: Mar 2004
Rookie Year: 2003
Location: Bethesda, MD
Posts: 8
Bio is an unknown quantity at this point
Re: Robot won't go straight

Quote:
Originally Posted by efoote868 View Post
last ditch effort, try calibrating your victors.
It's not a last ditch effort at all. We calibrated our victors using the method in this thread and it solved basically all our driving issues without any need for adjustments in the code or lookup tables.
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Robot Technology We Won't See In FIRST petek Math and Science 0 08-05-2006 08:40
Robot doesn't drive straight bush Control System 14 09-02-2006 00:00
Speed controllers won't communicate w/robot controller steven114 Control System 12 03-02-2005 21:26
Speed controllers won't communicate w/robot controller steven114 Electrical 12 03-02-2005 21:26
Shipped straight to Florida.... archiver 2001 3 24-06-2002 01:54


All times are GMT -5. The time now is 00:04.

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