Go to Post I thought Will.I.Am was a Dr. Seuss character - DonRotolo [more]
Home
Go Back   Chief Delphi > Technical > Programming
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 29-01-2007, 11:56
Tom Line's Avatar
Tom Line Tom Line is offline
Raptors can't turn doorknobs.
FRC #1718 (The Fighting Pi)
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 1999
Location: Armada, Michigan
Posts: 2,513
Tom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond repute
Gear tooth sensors - Forward or backward?

Alright - I'm sure someone already has this all figured out. Perhaps one of you folks can help our team. We pretty short on programming talent (as I see several other teams are) so figuring this one out is a challenge.

We are running Gyro + Gear tooth sensors for reasonably accurate driving. However, our old method of checking wheel spin direction no longer works.

We originally were going to use the timing of the rise of the wave form for the gear tooth sensor was different for forward or reverse. It was a rough way to tell if you were going forward or backward.

The new gear tooth sensors we received have the exact same timing - eliminating our ability to sense forward or reverse (per the new documentation).

Is there a method with the sensor to tell the change in direction? We've considered using the pwm value, but that would be an obvious software kludge that doesn't take coast / brake distance into account. I suppose this could go under electrical or programming, but since our current solution was software I figured I'd stick it in here.

Last edited by Tom Line : 29-01-2007 at 11:58.
  #2   Spotlight this post!  
Unread 29-01-2007, 12:33
Chris_Elston's Avatar
Chris_Elston Chris_Elston is offline
Controls Engineer
AKA: chakorules
FRC #1501 (Team THRUST)
Team Role: Engineer
 
Join Date: Feb 2004
Rookie Year: 2001
Location: Huntington, Indiana
Posts: 746
Chris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond repute
Re: Gear tooth sensors - Forward or backward?

We used two Grayhill 61K128 encoders on the gear box...well trying too...

Also you might be able to do what your doing. So you have an oscilloscope? Connect your output to your scope and check th PULSE width. I think if I remember right, the gear tooth has two different pulse widths. If it does, you might be able to write something with EasyC Pro's new "interrupt watcher" function to get what you need for direction from gear tooth sensing. OR...this will take some HELP from mechanical gurus...you might be able to mount TWO gear tooth sensors out of phase from each other and do the same thing.

Just some suggestions....

encoders work ok for us for counting distance for sure, we are having issues closing a PID around them and our transmissions. So I don't know what your application is.
__________________
Team T.H.R.U.S.T. 1501
Download all of our past robot's source code here:Repository

Favorite CD quote:
"That can't be their 'bot. not nearly enough (if any) rivets to be a 1501 machine." ~RogerR: Team #1369
  #3   Spotlight this post!  
Unread 29-01-2007, 12:54
Tom Line's Avatar
Tom Line Tom Line is offline
Raptors can't turn doorknobs.
FRC #1718 (The Fighting Pi)
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 1999
Location: Armada, Michigan
Posts: 2,513
Tom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond repute
Re: Gear tooth sensors - Forward or backward?

Chris - our "kludge" is this - keep checking the gear tooth increase. If it doesn't increase for a tick, then check if your pwm's are below 127. If so - it's pretty likely you're in reverse.

Then you can close your pid loop. That's how we're working it now, but I don't like it because I know there should / has to be a more elegant solution that doesn't use the software like this.

The pulse width is the same in forward or reverse for this year's gear tooth sensor. That's what broke our original shot at doing it (we did it with last years, and there WAS a difference then)
  #4   Spotlight this post!  
Unread 29-01-2007, 13:00
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,112
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: Gear tooth sensors - Forward or backward?

If you can't be sure that the motor will be moving in the same direction it's commanded, there's no good way to do what you want in software. The best thing I can think of is to use two gear tooth sensors on the same gear, mounted so that they give a quadrature signal just like a rotary encoder would.

Or just add a rotary encoder and be done with it.
  #5   Spotlight this post!  
Unread 29-01-2007, 13:46
Tom Line's Avatar
Tom Line Tom Line is offline
Raptors can't turn doorknobs.
FRC #1718 (The Fighting Pi)
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 1999
Location: Armada, Michigan
Posts: 2,513
Tom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond repute
Re: Gear tooth sensors - Forward or backward?

Speak english darn you! Rotary encoders?

Heh... just kidding. I'll show this to the kids and let them figure out which way they want to work on it. Thanks guys.
  #6   Spotlight this post!  
Unread 29-01-2007, 13:57
Chris_Elston's Avatar
Chris_Elston Chris_Elston is offline
Controls Engineer
AKA: chakorules
FRC #1501 (Team THRUST)
Team Role: Engineer
 
Join Date: Feb 2004
Rookie Year: 2001
Location: Huntington, Indiana
Posts: 746
Chris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond repute
Re: Gear tooth sensors - Forward or backward?

See if this helps:


http://lgrws01.grayhill.com/web/temp...velID=3&Rank=1


Link again in case above doesn't work.
__________________
Team T.H.R.U.S.T. 1501
Download all of our past robot's source code here:Repository

Favorite CD quote:
"That can't be their 'bot. not nearly enough (if any) rivets to be a 1501 machine." ~RogerR: Team #1369
  #7   Spotlight this post!  
Unread 30-01-2007, 09:19
charrisTTI charrisTTI is offline
Ramblin' Wreck
AKA: Charles Harris
FRC #0623
Team Role: Mentor
 
Join Date: Jan 2005
Rookie Year: 2003
Location: Vienna, VA
Posts: 106
charrisTTI has a spectacular aura aboutcharrisTTI has a spectacular aura about
Send a message via AIM to charrisTTI
Re: Gear tooth sensors - Forward or backward?

You are correct. Last year's gear tooth sensor (ATS651LSH) had two different pulse widths depending upon direction of rotation ( 45 us and 90 us - typical ). For this year's gear tooth sensor (ATS642LSH) the pulse width will vary based upon the speed of the rotation of the gear and the shape of the gear teeth as seen by the sensor. see the complete data sheet at www.allegromicro.com
__________________
FRC 623 2003,2004,2005,2006,2007,2008, 2009, 2010, 2011
FRC 1900 2007
FVC 60 and 193 2006
FVC 3271 2007
FTC 226 and 369 2008, 2009, 2010, 2011
FTC 3806 2010
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
Help with the Kit Gear Tooth sensors Keo-san Programming 9 20-02-2007 08:07
where can we buy hall effect sensors or gear tooth sensors amirjpl Electrical 3 13-02-2006 11:02
Gear Tooth Sensors et1337 Electrical 7 28-01-2006 22:48
Source for Additional Gear Tooth Sensors Madison Kit & Additional Hardware 3 18-01-2006 16:57
Accelerometer vs Gear Tooth Sensors zdeswarte Electrical 4 22-01-2005 15:35


All times are GMT -5. The time now is 10:44.

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