|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
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.
|
|
#2
|
|||
|
|||
|
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
|
|||||
|
|||||
|
Re: quadrature
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
|
|||
|
|||
|
Re: quadrature
Quote:
Robinson |
|
#5
|
|||||
|
|||||
|
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. |
|
#6
|
||||
|
||||
|
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
|
|
#7
|
|||||
|
|||||
|
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. |
|
#8
|
|||||
|
|||||
|
Re: Gear Tooth Sensor
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.
|
|
#9
|
||||
|
||||
|
Re: Gear Tooth Sensor
this is what it looks like :
Code:
printf("%d\r",rc_dig_in01);
|
|
#10
|
|||||
|
|||||
|
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
|
||||
|
||||
|
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. |
|
#12
|
|||
|
|||
|
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
|
|||||
|
|||||
|
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
|
|||
|
|||
|
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? |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
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 |