OCCRA
Go to Post No one would climb Mount Everest before climbing the hill in the park down the street. - RbtGal1351 [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Events   CD-Media   CD-Spy   FRC-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 06-20-2005, 04:07 PM
Mike's Avatar
Mike Mike is offline
has common ground with Matt Krass
AKA: Mike Sorrenti
FRC #0237 (Sie-H2O-Bots (See-Hoe-Bots) [T.R.I.B.E.])
Team Role: Programmer
 
Join Date: Dec 2004
Rookie Year: 2004
Location: Watertown, CT
Posts: 1,003
Mike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond repute
Backwards Mounted Motors

The way our tank drive was made, one tranny was mounted so that 254 would drive forward, and one mounted so that 254 would drive backwards. To deal with this, I added the following bit of code to my Drive() function.
Code:
if(intSpeed > 127)
{
	RIGHT_MOTORS	=	127 - (intSpeed - 127);
}
else
{
	RIGHT_MOTORS	=	127 + (127 - intSpeed);
}
The problem with this though, is that forwards speed is always higher than backwards speed. To solve this, I took the backwards RPM and divided it by the forwards RPM. Then, on the side that was forwards, I had the following code
Code:
if(intSpeed > 127)
{
	LEFT_MOTORS	=	intSpeed * .952;
}
else
{
	LEFT_MOTORS	=	intSpeed * (1 / .952);
}
After Battlecry, the driver told me that it was still veering to the right. Could the maximum RPM's have changed? How do you guys get around backwards tranny's?
__________________
-Mike
  #2   Spotlight this post!  
Unread 06-20-2005, 04:12 PM
sanddrag sanddrag is offline
back to school ;-)
FRC #0696 (Circuit Breakers)
Team Role: Teacher
 
Join Date: Jul 2002
Rookie Year: 2002
Location: Glendale, CA
Posts: 7,884
sanddrag has a reputation beyond reputesanddrag has a reputation beyond reputesanddrag has a reputation beyond reputesanddrag has a reputation beyond reputesanddrag has a reputation beyond reputesanddrag has a reputation beyond reputesanddrag has a reputation beyond reputesanddrag has a reputation beyond reputesanddrag has a reputation beyond reputesanddrag has a reputation beyond reputesanddrag has a reputation beyond repute
Re: Backwards Mounted Motors

If I was a programmer, I'd tell the driver to deal with it or tell the mechanical people to fix whatever is "dragging" or binding causing extra load/friction. The CIM motors should be VERY close in forward and reverse speed as far as I know. So, check your slower side tranny for extra friction somewhere.
__________________
Teacher/Engineer/Machinist - Team 696 Circuit Breakers, 2011 - Present
Mentor/Engineer/Machinist, Team 968 RAWC, 2007-2010
Technical Mentor, Team 696 Circuit Breakers, 2005-2007
Student Mechanical Leader and Driver, Team 696 Circuit Breakers, 2002-2004

Purchase Cree LED Bulbs from the Team 696 Online Store
  #3   Spotlight this post!  
Unread 06-20-2005, 08:38 PM
ConKbot of Doom ConKbot of Doom is offline
Team Alumni
FRC #1184 (Cobra Robotics)
Team Role: Leadership
 
Join Date: Jan 2005
Rookie Year: 2004
Location: Maryland
Posts: 153
ConKbot of Doom has a spectacular aura aboutConKbot of Doom has a spectacular aura aboutConKbot of Doom has a spectacular aura about
Re: Backwards Mounted Motors

Just so you know, the easy way to reverse a motor is
'255 - intSpeed'

That way you dont have to deal with the If() statements.

And yes, CIM motors, have neutral timing. They run just as good forwards as they do backwards. I would defintely have a poke at the drivetrain. Even though it'll still probably be your problem to fix.
__________________
2005 Philly #1 seeded team, highest average points, and semi-finalists
Thanks to 103 and 484 for being alliance mates.

Last edited by ConKbot of Doom : 06-20-2005 at 08:42 PM.
  #4   Spotlight this post!  
Unread 06-20-2005, 10:14 PM
billbo911's Avatar
billbo911 billbo911 is offline
Registered User
AKA: That's "Mr. Bill"
FRC #2073 (EagleForce)
Team Role: Mentor
 
Join Date: Mar 2005
Rookie Year: 2005
Location: Elk Grove, Ca.
Posts: 1,873
billbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond repute
Re: Backwards Mounted Motors

Why not just swap the pos. and neg. leads to the motor at the Victor for the right motor? No software or programming required.
I find it is always easier to do the simple things first.
Now your only limitation is that most joysticks never get all the way to 0 in full reverse.
  #5   Spotlight this post!  
Unread 06-21-2005, 05:28 AM
Ryan M. Ryan M. is offline
Programming User
FRC #1317 (Digital Fusion)
Team Role: Programmer
 
Join Date: Jan 2004
Rookie Year: 2004
Location: Ohio
Posts: 1,508
Ryan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud of
Re: Backwards Mounted Motors

Quote:
Originally Posted by Mike
After Battlecry, the driver told me that it was still veering to the right. Could the maximum RPM's have changed? How do you guys get around backwards tranny's?
Well, not the max RPMs, but the motors do get broken in after some heavy running, which causes them to run differently.
__________________

  #6   Spotlight this post!  
Unread 06-21-2005, 06:50 AM
Paul Copioli's Avatar Unsung FIRST Hero Woodie Flowers Award
Paul Copioli Paul Copioli is offline
#BuildBlitz #TeamCopioli
no team (TeamCopioli)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 2000
Location: Rockwall, TX
Posts: 1,292
Paul Copioli has a reputation beyond reputePaul Copioli has a reputation beyond reputePaul Copioli has a reputation beyond reputePaul Copioli has a reputation beyond reputePaul Copioli has a reputation beyond reputePaul Copioli has a reputation beyond reputePaul Copioli has a reputation beyond reputePaul Copioli has a reputation beyond reputePaul Copioli has a reputation beyond reputePaul Copioli has a reputation beyond reputePaul Copioli has a reputation beyond repute
Re: Backwards Mounted Motors

Mike,

The CIM motors are the same in forward and reverse. Our transmission arrangement had one tranny mounted "backwards" and we drove perfectly straight without code adjustments to motor speed. Something else is going on in the drive. First check for any bind in the transmissions, especially chain. Next, check to see if the motors are O.K. Use code as a last resort.

-Paul
  #7   Spotlight this post!  
Unread 06-21-2005, 08:31 AM
KTorak's Avatar
KTorak KTorak is offline
Fire Rescue 47
AKA: Kyle Dersch
FRC #1023 (Bedford Express)
Team Role: Driver
 
Join Date: Jan 2005
Rookie Year: 2005
Location: Montgomery Village, MD
Posts: 899
KTorak has a reputation beyond reputeKTorak has a reputation beyond reputeKTorak has a reputation beyond reputeKTorak has a reputation beyond reputeKTorak has a reputation beyond reputeKTorak has a reputation beyond reputeKTorak has a reputation beyond reputeKTorak has a reputation beyond reputeKTorak has a reputation beyond reputeKTorak has a reputation beyond reputeKTorak has a reputation beyond repute
Send a message via AIM to KTorak
Re: Backwards Mounted Motors

Contrary to popular belief, it is NEVER a program issue, always hardware
__________________
Kyle D- Myspace - Facebook
2008 Bedford Express Driver & Build & Design (Team) Co-Leader
2007 Bedford Express Driver & Build & Design (Team) Leader
2006 Bedford Express Driver, Build Team Member, & Board of Directors
2005 Bedford Express Rookie, Build Team Member & Robot Operator
-
2008 - GLR Quarter Finalist
2007 - GLR Finalist & Boilermaker Finalist & MARC Off Season Event Winner
2006 - GLR Johnson & Johnson Sportsmanship Award & Archimedes 7th Seed Quarter Finalist
2005 - GLR Finalist & Judges Award.
2004 - GLR Semi Finalist.
2003 - GLR/DTR Quarter Finalist & GLR/NAT'L Rookie All Star.
  #8   Spotlight this post!  
Unread 06-21-2005, 11:00 PM
Redneck's Avatar
Redneck Redneck is offline
Hacker Hick
AKA: Jamie (2.0) Moran
FRC #0599 (Robodox)
Team Role: Engineer
 
Join Date: Aug 2004
Rookie Year: 2004
Location: California
Posts: 90
Redneck is just really niceRedneck is just really niceRedneck is just really niceRedneck is just really nice
Send a message via AIM to Redneck
Re: Backwards Mounted Motors

F.I.R.S.T. Troubleshooting Rule #1 - If you work on software, the problem is always with hardware. If you work with hardware, the problem is always with software
__________________


Which badges can you claim?
  #9   Spotlight this post!  
Unread 06-22-2005, 12:38 PM
jgannon's Avatar
jgannon jgannon is offline
I ᐸ3 Robots
AKA: Joey Gannon
no team
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Pittsburgh, PA
Posts: 1,475
jgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond repute
Re: Backwards Mounted Motors

I'm going to have to agree with everything above. I found it easier to reverse the leads on one set of CIMs, rather than having to fix it in code. Also, the CIMs do run almost identically in forward or reverse, so I would say that there must be something whack with your right tranny.

<edit>
In an attempt to actually add something new and insightful to the discussion, rather than just repeating what everyone else said, here's how I fixed the drift on our drill motors last year (which do indeed run very differently in forward and reverse). We hooked up an encoder to each wheel (we just used Banner sensors and white dots on the wheels, since it was far too late to integrate a real encoder). Then I wrote a segment of code in Default_Routine() that ran the drive motors for about ten seconds (350 program cycles, I think), counting encoder clicks the whole time. I'd put the robot up on blocks, and then execute the code with a specific combination of joystick button presses. At the end, it would determine the ratio of encoder clicks (a/(a+b)), and then apply that difference to the faster motor. Basically, instead of hard-coding the ratio as you've done, you could do this to adjust the ratio on the fly, and store the result to EEPROM. Then you can recalibrate it whenever your drivers start to complain again. See if there are any obvious problems with your tranny first, and then try this.
</edit>
__________________
Team 1743 - The Short Circuits
2010 Pittsburgh Excellence in Design & Team Spirit Awards
2009 Pittsburgh Regional Champions (thanks to 222 and 1218)
2007 Pittsburgh Website Award
2006 Pittsburgh Regional Champions (thanks to 395 and 1038)
2006 Pittsburgh Rookie Inspiration & Highest Rookie Seed

Team 1388 - Eagle Robotics
2005 Sacramento Engineering Inspiration
2004 Curie Division Champions (thanks to 1038 and 175)
2004 Sacramento Rookie All-Star

_

Last edited by jgannon : 06-22-2005 at 12:47 PM. Reason: More info
  #10   Spotlight this post!  
Unread 06-22-2005, 01:39 PM
John Gutmann John Gutmann is offline
I'm right here
AKA: sparksandtabs
FRC #0340 (GRR)
Team Role: Mechanical
 
Join Date: Feb 2005
Rookie Year: 2004
Location: rochester
Posts: 804
John Gutmann has a brilliant futureJohn Gutmann has a brilliant futureJohn Gutmann has a brilliant futureJohn Gutmann has a brilliant futureJohn Gutmann has a brilliant futureJohn Gutmann has a brilliant futureJohn Gutmann has a brilliant futureJohn Gutmann has a brilliant futureJohn Gutmann has a brilliant futureJohn Gutmann has a brilliant futureJohn Gutmann has a brilliant future
Send a message via AIM to John Gutmann Send a message via MSN to John Gutmann Send a message via Yahoo to John Gutmann
Re: Backwards Mounted Motors

mount the motors both facing the same way but 1 with a shaft the it drives situated next to it the runns from the output to the wheels it needs to drive, or get some sort of encoders to accurately measure the speed while moving because the rpms may be diff at max rpms but the you gotta look at the torque curve to find out rpms at diff levels of torque being applied to it
  #11   Spotlight this post!  
Unread 06-22-2005, 02:43 PM
Mike's Avatar
Mike Mike is offline
has common ground with Matt Krass
AKA: Mike Sorrenti
FRC #0237 (Sie-H2O-Bots (See-Hoe-Bots) [T.R.I.B.E.])
Team Role: Programmer
 
Join Date: Dec 2004
Rookie Year: 2004
Location: Watertown, CT
Posts: 1,003
Mike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond repute
Re: Backwards Mounted Motors

Thanks for the help guys, I'll talk to our mechanical team...
__________________
-Mike
  #12   Spotlight this post!  
Unread 06-22-2005, 03:21 PM
dez250 dez250 is offline
54... What a good number!
no team
 
Join Date: Dec 2002
Rookie Year: 2000
Location: Upstate NY / Manchester, NH
Posts: 1,692
dez250 has a reputation beyond reputedez250 has a reputation beyond reputedez250 has a reputation beyond reputedez250 has a reputation beyond reputedez250 has a reputation beyond reputedez250 has a reputation beyond reputedez250 has a reputation beyond reputedez250 has a reputation beyond reputedez250 has a reputation beyond reputedez250 has a reputation beyond reputedez250 has a reputation beyond repute
Send a message via AIM to dez250
Re: Backwards Mounted Motors

Quote:
Originally Posted by billbo911
Now your only limitation is that most joysticks never get all the way to 0 in full reverse.
Mechanically ill agree with you, but when it comes to control while using a victor speed controller ill have to disagree. The way you get the joystick to go all the way to "complete 255 and 0" is by calibrating the victor. I cant stress it enough to teams that you can not just connect random joysticks to the OI and get a full range of change at the victor speed controllers. Though if you calibrate your victors to joysticks you can get a full range of change. Also each time you change your joysticks or victors you should recalibrate the victors.

[edit] For those insterested, calibration instructions are in the Victor 884 User Manual. [/edit]
__________________
#5

-Michael Dessingue

Last edited by dez250 : 06-22-2005 at 04:13 PM. Reason: added link
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
2 Globe Motors??? ChuckDickerson Motors 18 01-25-2005 02:53 PM
Drill Motors Removed? Illegal this year? Chris_Elston Motors 12 01-12-2005 08:04 AM
Looking for practice motors & extra tape drive parts? archiver 2000 1 06-23-2002 09:54 PM
"Motors and Drive train edition" of Fresh From the Forum Ken Leung CD Forum Support 6 01-29-2002 11:32 AM
Drill Motors TF8 Motors 19 12-12-2001 12:13 PM


All times are GMT -5. The time now is 01:02 PM.

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


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