Go to Post When teams work together to design things rather than going it alone, you can really come up with magnificent machines. - JesseK [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 16-01-2007, 15:47
Andrew Schuetze's Avatar
Andrew Schuetze Andrew Schuetze is offline
499 Founder / Alamo FTC & FLL AP
no team
Team Role: Leadership
 
Join Date: Jan 2002
Rookie Year: 2001
Location: San Antonio, Texas
Posts: 689
Andrew Schuetze has a reputation beyond reputeAndrew Schuetze has a reputation beyond reputeAndrew Schuetze has a reputation beyond reputeAndrew Schuetze has a reputation beyond reputeAndrew Schuetze has a reputation beyond reputeAndrew Schuetze has a reputation beyond reputeAndrew Schuetze has a reputation beyond reputeAndrew Schuetze has a reputation beyond reputeAndrew Schuetze has a reputation beyond reputeAndrew Schuetze has a reputation beyond reputeAndrew Schuetze has a reputation beyond repute
quadrature

Reading these posts seems to confirm my thoughts that this sensor doesn't provide rotation direction information. CW or CCW This of course does not render this a useless sensor as one is often powering the motor from which sensor data is being generated. Meaning you already know its rotation and just need rotational speed for closed-loop feedback.
__________________
APS

Founder FRC 499
Parent alumni FRC 2745 & 4219
Co-Coach FTC 4549 & 6407
Alamo FTC Affiliate Partner
Alamo FLL Affiliate Partner
  #2   Spotlight this post!  
Unread 16-01-2007, 18:41
Ultima Ultima is offline
Registered User
FRC #0369
 
Join Date: Oct 2005
Location: Brooklyn, NY
Posts: 26
Ultima will become famous soon enough
Re: Gear Tooth Sensor

Well the sensor is quiet more usuful than that if we can get it to work.
It will provide us with a tooth count with which we can cross reference the speed of the motors and figure out what kind of a distance we traveled.


That is if we can get it to work =\
  #3   Spotlight this post!  
Unread 16-01-2007, 21:10
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: quadrature

Quote:
Originally Posted by Andrew Schuetze View Post
...one is often powering the motor from which sensor data is being generated. Meaning you already know its rotation and just need rotational speed for closed-loop feedback.
It took us a few tries last year to find and correct a small problem with this idea. When turning a small amount, the output from the direction PID can sometimes be too small to get out of the Victor deadband on one side of the 'bot but still drive the other side. What happens is that the entire robot moves forward, while the feedback routine is assuming it's turning in place. We had to ensure that we always applied a high enough control value to the Victors to actually make the motors move in the desired direction.
  #4   Spotlight this post!  
Unread 16-01-2007, 22:46
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: quadrature

Quote:
Originally Posted by Alan Anderson View Post
[...] When turning a small amount, the output from the direction PID can sometimes be too small to get out of the Victor deadband on one side of the 'bot but still drive the other side. What happens is that the entire robot moves forward, while the feedback routine is assuming it's turning in place. [...]
A few questions:
  • How does the entire 'bot move forward with only one motor out of the deadband? I would think it would turn around that wheel.
  • In concert with the GTS, shouldn't the I term correct for this? (since the wheel in theory shouldn't be moving if the signal isn't enough to turn the motor)
  • Just out of curiosty, what is this PID loop for? Is it used during autonomous or driver control?
Thanks,
Robinson
  #5   Spotlight this post!  
Unread 17-01-2007, 07:19
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: quadrature

Quote:
Originally Posted by gnirts View Post
How does the entire 'bot move forward with only one motor out of the deadband? I would think it would turn around that wheel.
A well-built four- or six-wheel drivebase will tend to go straight when a forward force is applied to it at any location. Imagine a skateboard -- when you push off with a foot to one side, you still go the way the wheels are pointing.

The PID control was only used for positioning during autonomous, though the code originally also had the ability to use speed control instead of power control for normal operation. I have yet to find a driver who prefers that option.
  #6   Spotlight this post!  
Unread 17-01-2007, 17:40
987HighRoller's Avatar
987HighRoller 987HighRoller is offline
Vegas....Baby
AKA: Alex Sambvani
FRC #0987 (High Rollers)
Team Role: College Student
 
Join Date: May 2006
Rookie Year: 2005
Location: Las Vegas, Nevada
Posts: 80
987HighRoller has a spectacular aura about987HighRoller has a spectacular aura about
Re: Gear Tooth Sensor

Ok, I'm having problems with the gear tooth sensor. I have the sensor wired up correctly and everything, but when I print the value of the digital port, it stays at 0. I have tried puting a gear in front of it in all sorts of postitions. I've tested the power connection and the connection to the rc and it seems all to be right. Am I missing something? Thanks
__________________
Team 987 - The High Rollers - Las Vegas, Nevada
2007 Las Vegas Regional Finalists
2007 Newton Champions

2007 Championship Winners! Thanks to 190 and 177

2008 IRI CHAMPS with 67 and 330
  #7   Spotlight this post!  
Unread 17-01-2007, 21:08
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: Gear Tooth Sensor

Quote:
Originally Posted by 987HighRoller View Post
Ok, I'm having problems with the gear tooth sensor. I have the sensor wired up correctly and everything, but when I print the value of the digital port, it stays at 0.
I know you said you wired it correctly, but that's still the first place to start. What do you have connected to the six connection points on the sensor?

Have you configured the port as an input? You probably didn't need to do anything special, because the default code sets all digital pins to inputs in User_Initialization().

How exactly are you printing the value? Show us the line of code that you're using.

Once we've determined that you can indeed read the state of the input pin, you're only half finished. Unless you intend to monitor a gear that has only a few teeth going by per second, you will almost certainly need to use interrupts in order to count gear teeth reliably.
  #8   Spotlight this post!  
Unread 18-01-2007, 00:23
Bharat Nain's Avatar
Bharat Nain Bharat Nain is offline
Registered User
no team
Team Role: Alumni
 
Join Date: Jan 2004
Rookie Year: 2003
Location: New York
Posts: 2,000
Bharat Nain has a reputation beyond reputeBharat Nain has a reputation beyond reputeBharat Nain has a reputation beyond reputeBharat Nain has a reputation beyond reputeBharat Nain has a reputation beyond reputeBharat Nain has a reputation beyond reputeBharat Nain has a reputation beyond reputeBharat Nain has a reputation beyond reputeBharat Nain has a reputation beyond reputeBharat Nain has a reputation beyond reputeBharat Nain has a reputation beyond repute
Send a message via AIM to Bharat Nain Send a message via MSN to Bharat Nain
Re: Gear Tooth Sensor

Quote:
Originally Posted by Alan Anderson View Post

How exactly are you printing the value? Show us the line of code that you're using.
I faced that problem with I was playing with encoders last year. If you don't print it out correctly, it will display as zero. Please post the part of your code that prints out the values and make sure you have the code configured correctly. Read and re-read the readme.txt file.
__________________
-= Bharat Nain =-

Whatever you do, you need courage. Whatever course you decide upon, there is always someone to tell you that you are wrong. There are always difficulties arising that tempt you to believe your critics are right. To map out a course of action and follow it to an end requires some of the same courage that a soldier needs. Peace has its victories, but it takes brave men and women to win them. - Ralph Waldo Emerson
  #9   Spotlight this post!  
Unread 18-01-2007, 17:19
987HighRoller's Avatar
987HighRoller 987HighRoller is offline
Vegas....Baby
AKA: Alex Sambvani
FRC #0987 (High Rollers)
Team Role: College Student
 
Join Date: May 2006
Rookie Year: 2005
Location: Las Vegas, Nevada
Posts: 80
987HighRoller has a spectacular aura about987HighRoller has a spectacular aura about
Re: Gear Tooth Sensor

this is what it looks like :
Code:
printf("%d\r",rc_dig_in01);
Thanks for all of the help
__________________
Team 987 - The High Rollers - Las Vegas, Nevada
2007 Las Vegas Regional Finalists
2007 Newton Champions

2007 Championship Winners! Thanks to 190 and 177

2008 IRI CHAMPS with 67 and 330
  #10   Spotlight this post!  
Unread 19-01-2007, 01:16
Bomberofdoom's Avatar
Bomberofdoom Bomberofdoom is offline
Biggest FIRST addict in Israel
AKA: Nir Levanon
FRC #2230 (Zcharia's Angels)
Team Role: Programmer
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Israel
Posts: 471
Bomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond repute
Send a message via MSN to Bomberofdoom
Re: Gear Tooth Sensor

Hi, sorry for bumping in, but we just recieved the 2 GTS pieces and we'd like to know how exactly do we use it?(where do we connect, what values to we use, what we need to code or what code to download to make it work etc..)
  #11   Spotlight this post!  
Unread 19-01-2007, 12:04
Phalanx's Avatar
Phalanx Phalanx is offline
Formerly Team 1089 (Mercury)
AKA: Michael Reffler
FRC #5431 (Titan Robotics)
Team Role: Mentor
 
Join Date: Jun 2005
Rookie Year: 1999
Location: Lewisville, TX (previously NJ)
Posts: 384
Phalanx has a reputation beyond reputePhalanx has a reputation beyond reputePhalanx has a reputation beyond reputePhalanx has a reputation beyond reputePhalanx has a reputation beyond reputePhalanx has a reputation beyond reputePhalanx has a reputation beyond reputePhalanx has a reputation beyond reputePhalanx has a reputation beyond reputePhalanx has a reputation beyond reputePhalanx has a reputation beyond repute
Re: Gear Tooth Sensor

Quote:
Originally Posted by Bomberofdoom View Post
Hi, sorry for bumping in, but we just recieved the 2 GTS pieces and we'd like to know how exactly do we use it?(where do we connect, what values to we use, what we need to code or what code to download to make it work etc..)
Everythng you need to know is in this thread......

First off, download and read Kevin Watsons encoder code and encoder FAQ
http://www.kevin.org/frc/encoder/
http://www.kevin.org/frc/frc_encoder.zip

To make his code work with the gear tooth sensors you need to remove the "Phase B" logic from it.

Second you wire them to digital I/O 1 and digital I/O 2 with a pwm cable. You also need to power them on a 12volt power supply as well.

See the 2007 Sensor Manual for more information.

To wire the sensor...

Take one end of a pwm cable, and solder it to J2, the black wire to GB (ground-black) the red wire to 5R (+5 volts-red) the white wire to SW (signal white). Connect the other end of this pwm to digital I/O 1.

Take a 2nd pwm cable and solder it to J1, the black wire to GB, the white wired to (12W), the red wire is unused. Connect the other end to a 20amp circut on one of your atc breaker panels.

Mount the sensor from .5 to 2.75 mm away from the gear to be measured.

Repeat this for the second one except connect it to digital I/O 2.

As for the code...
Use encoder 1 and encoder 2, disable the others. Then remove the "Phase B" logic in the interrupt handler for encoder 1 and encoder 2.
__________________
Don't just ask the experts, become one!
Leadership is not about ability. It's about responsibility!
Diagonally Parked in a Parallel Universe. It's okay we do Quantum Physics


  #12   Spotlight this post!  
Unread 21-01-2007, 23:22
slloyd slloyd is offline
Registered User
AKA: Sonny
FRC #1221 (Nerbotics)
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 2006
Location: CANADA -eh?
Posts: 20
slloyd is an unknown quantity at this point
2007 Gear Tooth Sensor (GTS) - does indicate direction

i just wanted to clear up a misconception, the GTS 2007 does indeed indicate the direction but in a manor different than the 2006.

reading the datasheet for the sensor,

http://www.allegromicro.com/datafile/0642.pdf

we see on page 10 that if the gear rotates past the sensor in a 'pin 1 to pin 4' direction, then the output produces a square wave pattern, about 50% duty cycle.

but

if the same wheel rotates past the same sensor the other direction, now pin 4 to pin 1, that same square wave pattern is produced BUT the signal is inverted!

now... who wants to provide the code for this

slloyd
  #13   Spotlight this post!  
Unread 30-01-2007, 05:11
Bomberofdoom's Avatar
Bomberofdoom Bomberofdoom is offline
Biggest FIRST addict in Israel
AKA: Nir Levanon
FRC #2230 (Zcharia's Angels)
Team Role: Programmer
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Israel
Posts: 471
Bomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond repute
Send a message via MSN to Bomberofdoom
Re: Gear Tooth Sensor

From what I understood from our mentor, the GTS has 4 holes to insert 4 certain screws that are supposed to "tick" with the gear teeth. Those screws are to be, as you say, .5 to 2.7 mm from the certain geartooth?
And another thing, Kevin mentioned this illustration in his Encodr FAQ:
http://kevin.org/frc/encoder/encoder_isr_latency.pdf
What is this illustration about?
And even furthermore, why are there 6 encoder counts in Kevin's Encoder code(we did understand that the first 2 are to calculate velocity of the gear teeth, the 3rd and 4th for the positioning[in relation to the begining point in each intialization of the RC and everything])?
And could someone please send an exact illustration how to connect the GTS to the geer tooth or a picture of a team's GTS connection?

Last edited by Bomberofdoom : 30-01-2007 at 07:44.
  #14   Spotlight this post!  
Unread 09-01-2008, 21:03
Mike Bennett Mike Bennett is offline
Registered User
FRC #1918
Team Role: Programmer
 
Join Date: Jan 2008
Rookie Year: 2008
Location: Fremont, Michigan
Posts: 5
Mike Bennett is an unknown quantity at this point
Re: Gear Tooth Sensor

I have been wiring up the Gear Tooth sensor boards and found that there are two of them but the labeling on one has J1 & J2 while the other has J4 & J5.

We have two sets and I found that the J4 & J5 sensor boards do not work while the two J1 & J2 sensor boards work.

What is the difference?
  #15   Spotlight this post!  
Unread 09-01-2008, 22:35
Sunshine's Avatar
Sunshine Sunshine is offline
Mr. S
FRC #2062 (C.O.R.E)
Team Role: Mentor
 
Join Date: Dec 2007
Rookie Year: 2007
Location: Wisconsin
Posts: 482
Sunshine is a splendid one to beholdSunshine is a splendid one to beholdSunshine is a splendid one to beholdSunshine is a splendid one to beholdSunshine is a splendid one to beholdSunshine is a splendid one to beholdSunshine is a splendid one to beholdSunshine is a splendid one to behold
Re: Gear Tooth Sensor

Is this what you are looking for?

Try This
__________________
C.O.R.E. Community Of Robotic Engineers
2015 Wisconsin Regional Champs, Safety Award
2015 Midwest Regional Champs, Safety Award, Industrial Controls Award
2014 Midwest Regional Judges Award
2013 Lake Superior Champs
2012 World Championship Safety Award, World Finalist for the Autodesk Award
2011 Wisconsin Regional - Website Award 10,000 Lakes - Innovation in Control, Safety Award
2010 World Championship - Archimedes Semi-Finalists -World Finalist for the Autodesk Award
2010 10,000 Lakes Regional Champs, Entrepreneurship Award; Wisconsin Regional- Entrepreneurship Award, Safety Award
2009 WI Regional- Quality Award, Safety Award 10,000 Lakes - Safety Award, Motorola Quality Award, Animation Award
2008 World Championship Safety Award
2008 Wisconsin Regional Champs, Safety Award
2008 St. Louis Regional Entrepreneurship Award, Safety Award, Website Award
2007 Wisconsin Regional All-Star Rookie Award
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
Gear Tooth Sensor nukem Programming 9 04-02-2006 20:21
Gear Tooth Sensor Talha Electrical 1 23-01-2006 21:29
Gear Tooth Sensor AMIRAM Electrical 2 22-01-2006 04:09
Gear Tooth Sensor Question (InsrtNameHere) Electrical 2 20-01-2006 02:19
Gear tooth sensor issues Nine9cracker Electrical 2 17-01-2006 02:37


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

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