![]() |
Re: quadrature
Quote:
|
Re: quadrature
Quote:
APS |
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. |
Re: quadrature
Quote:
|
Re: quadrature
Quote:
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. |
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
|
Re: Gear Tooth Sensor
Quote:
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. |
Re: Gear Tooth Sensor
Quote:
|
Re: Gear Tooth Sensor
this is what it looks like :
Code:
printf("%d\r",rc_dig_in01); |
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..)
|
Re: Gear Tooth Sensor
Quote:
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. |
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 :p slloyd |
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? |
Re: Gear Tooth Sensor
Quote:
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. |
Re: Gear Tooth Sensor
OH, SWEET!!!:D :cool:
So could you answer my other questions related to Kevin's Encoder code? |
| All times are GMT -5. The time now is 20:48. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi