Go to Post Do not interrupt, do not defend yourself - just listen. After they are done, be sure to thank them for their honest feedback, and close the books. Arguing or defending is not how to accept feedback. - 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
  #16   Spotlight this post!  
Unread 17-01-2007, 00:46
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: quadrature

Quote:
Originally Posted by Andrew Schuetze View Post
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.
Actually the sensor does provide you with rotation direction information, but it is not easy, nor worth while to obtain IMO. You would need to measure the length of the pulse width of the signal. In the sensors datasheet it does say what the lengths of the pulse widths are. They are different for forward moving(CW) and reverse moving(CCW).
__________________
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



Last edited by Phalanx : 17-01-2007 at 00:49.
  #17   Spotlight this post!  
Unread 17-01-2007, 01:12
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
Re: quadrature

Quote:
Originally Posted by Phalanx View Post
Actually the sensor does provide you with rotation direction information, but it is not easy, nor worth while to obtain IMO. You would need to measure the length of the pulse width of the signal. In the sensors datasheet it does say what the lengths of the pulse widths are. They are different for forward moving(CW) and reverse moving(CCW).
One of our programming mentors read this and I just can't get my head around how this works if the sprocket teeth are symetrical Maybe a picture would help. Does the spec sheet have one?

APS
__________________
APS

Founder FRC 499
Parent alumni FRC 2745 & 4219
Co-Coach FTC 4549 & 6407
Alamo FTC Affiliate Partner
Alamo FLL Affiliate Partner
  #18   Spotlight this post!  
Unread 17-01-2007, 01:52
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

First here's the datasheet
http://www.allegromicro.com/datafile/0642.pdf

Try to think of it this way......

When the gear is moving forward (CW), as a tooth passes, the digital signal from the GTS goes high (0 to 1 or off to on) and stays high for a specified length of time and then turns off.

When the gear is moving backward(CCW), as a tooth passes, the digital signal from the GTS goes high (0 to 1 or off to on) and stays high for a specified length of time and then turns off.

What is different between the two is the length of the time that the signal remains high. So besides noting the interrupt or the transition from 0 to 1, you would now also need to know the length of time it remained one.

Thus by knowing the time the signal reamained one, based on the datasheet you would know the direction. There is a time range for sensing forward, and a different time range for reverse. Last years sensor was 45microseconds(CW) for forward and 90microseconds(CCW) for reverse.

I hope this helps.
__________________
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



Last edited by Phalanx : 17-01-2007 at 02:01.
  #19   Spotlight this post!  
Unread 17-01-2007, 07:11
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 Phalanx View Post
Actually the sensor does provide you with rotation direction information,...
The GTS in the 2006 Kit of Parts did that. The 2007 one does not. The Allegro part on the board is different.
  #20   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.
  #21   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
  #22   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.
  #23   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
  #24   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
  #25   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..)
  #26   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


  #27   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
  #28   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.
  #29   Spotlight this post!  
Unread 30-01-2007, 08:45
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 Bomberofdoom View Post
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.
You understand incorrectly. Have you ever seen the GTS board? Please find it and get familiar with it. Many of your questions can be answered by simply looking at it.

The GTS board has two holes. Those holes are just for mounting the board in place. The actual sensor part is a black block at the edge of the board. Its face should be placed a millimeter or so from the teeth of a rotating steel gear. Nothing on the board touches the gear. It senses the passage of teeth by detecting changes in the magnetic field around the sensor.
  #30   Spotlight this post!  
Unread 30-01-2007, 09:42
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

OH, SWEET!!!
So could you answer my other questions related to Kevin's Encoder code?
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 02:07.

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