View Single Post
  #32   Spotlight this post!  
Unread 31-01-2007, 11:14
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
Ok, I understood how to connect the GTS....well, except for the connection to the 20 AMP one. How do we do that?
One wire goes from a 20-amp-protected tab on the black breaker panel to the +12v connection on the board. Another wire goes from the ground connection on the board to a ground tab on the breaker panel.
Quote:
And what's with the phase B, what is it, what's the illustration in Kevin's FAQ and what do I need to do with it in Kevin's Encoder code to make things work?
References to "phase B" apply to quadrature encoders. The Gear Tooth Sensor is not one of those; it has no "phase B" signal.

The illustration I believe you are referring to shows how a too-fast quadrature signal can be misread if the software is not responsive enough to process an interrupt before the signals change. It is not relevant to the Gear Tooth Sensor. (A different problem is possible if the GTS interrupt rate gets too high, but "too high" in this case means more than several thousand pulses per second.)

If you use inputs 1 and 2 and leave the associated phase B inputs disconnected so they remain high, I think Kevin's encoder software will work without modification. To change it so that it works specifically with a single-phase pulse instead of a quadrature signal, just remove the test for the level of the phase B input, and make the code always increment the counter when the interrupt occurs. If you want to, you can get fancier and choose whether to increment or decrement the counter based on which direction you think the gear is turning.