|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#31
|
|||||
|
|||||
|
Re: Gear Tooth Sensor
Ok, I understood how to connect the GTS....well, except for the connection to the 20 AMP one. How do we do that?
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? |
|
#32
|
|||||
|
|||||
|
Re: Gear Tooth Sensor
Quote:
Quote:
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. |
|
#33
|
|||||
|
|||||
|
Re: Gear Tooth Sensor
Quadrature signal??? (O_o')
|
|
#34
|
|||
|
|||
|
Re: Gear Tooth Sensor
our team's head programmer (GO 1221!!) got the encoder going earlier this week. the posts on this message board and kevin's code/FAQ were invaluable.
now... what to do with this information? we would like to use it to help the mobility of our robot become smooth and accurate. i have read the FIRST document for PID control of motors, it was linked somewhere but i forget now. seems this is a good match and is the right way to go. but, looks really tough to program. maybe need floating point math? also, has anyone successfully determined which direction the gear is rotating (see my earlier post that proves it IS at least possible with 2007 sensor). i'd appreciate your comments if you have. slloyd |
|
#35
|
|||||
|
|||||
|
Re: Gear Tooth Sensor
Just realized, haven't got an answer from this question and the programming sub-team is about to start working soon, so if we could get assistance we that we'll be able to work on this encoder faster.
So, anyone, quardrate signal and stuff? Anyone knows? |
|
#36
|
|||
|
|||
|
Re: Gear Tooth Sensor
Is that last question asking for an explanation of Quadrature Output? OK if it is, Wikipedia has a pretty basic one and there are a lot others but look at
http://en.wikipedia.org/wiki/Rotary_encoder And scroll down to the section headed "Incremental rotary encoder". They also explain that backward count problem so kudos to them for being through. This same theory applies to rotary and strip encoding schemes so the entire article is a good read. Hope that's what you were asking. Steve |
|
#37
|
|||||
|
|||||
|
Re: Gear Tooth Sensor
Thank you, that was an excellent read!
I even tried with the mouse (yes...I admit..I use old mouses ) and if I spinned one of the "scrollers" top fast the mouse on the screen actually bounced to the other side and then back! I think I might have a question about the "two sensors" thing. I belive the GTS has those "two sensors" (as in Phase A and Phase B) inside them, is that correct? I'm just quite tired now and I don't think I'll be able to go over the encoder code now, but I'm hoping to do so tommorow and maybe finally understand how to work with this stuff. Thanks again. |
|
#38
|
|||
|
|||
|
Re: Gear Tooth Sensor
Quote:
Single GTS is intended to give you theoretical distance traveled on a wheel but you keep track of direction by knowing WHICH direction you are driving the motor. IN other words if my PWM is > 127 and I get a signal I add to my counter... < 127 and I get a signal then I subtract from the count. Same with a relay driving a motor. if the forward direction is set and the interrupt occurs you add to the count...well you get the idea. Rotary optical encoder have two sensors built in at 90 degree offsets so they are very accurate and directional information comes from knowing what the previous state was... or in hardware by using a simple flipflop. clocked by the A phase. (See the banebot encoder schematic for their divider page 5 of the manual http://banebots.com/pc/ELECTRONICS/EN-A0001-KT ) Now ALL this tells you how much the motor and wheel have rotated but do not take into account slippage of the wheel to the ground, so one more "fly in the ointment" ( Where do we get these old sayings anyway? ) OK that's my piece for now Steve |
|
#39
|
||||
|
||||
|
Re: Gear Tooth Sensor
Quote:
|
|
#40
|
|||
|
|||
|
Re: Gear Tooth Sensor
Ah! I see what you are saying... you kill power but the bot still rolls. Well ok you have to "remember" which direction you were rolling and allow the bot to come to a complete stop... before changing direction with a single GTS. Yes in that case Quad is preferable.
But probably not a problem with something like positioning an arm. In any case... this is still a "dead reckoning" scheme so it's an approximation anyway. (If it were easy it wouldn't be worth doing. ) In an aside... to obtain Quad with GTS... one suggestion has been that : 1) using a gear with an odd number of teeth. 2) using two GTS 3) IF you carefully position them at 90 degrees to the gear center, you get a 90 degree phase shift and can treat them as an A B phased encoder. I haven't done the math on this but it seems plausible. Steve |
|
#41
|
||||
|
||||
|
Re: Gear Tooth Sensor
Quote:
Has anyone actually done this? My gut feeling is that the trouble of mounting and keeping two GTSs aligned out of phase would be more trouble than just using an encoder. I'd love to hear from anyone who's done this with the kit GTSs though! |
|
#42
|
|||
|
|||
|
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? |
|
#44
|
||||
|
||||
|
Re: Gear Tooth Sensor
We know how to wire our gear tooth sensor, but how do we put the wires through the gearbox to the board. Anyone have any solutions to sending the wires through the gear box to the board, is there a certain way to run the wires?
|
|
#45
|
|||
|
|||
|
Re: Gear Tooth Sensor
Why?
|
![]() |
| 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 |