Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Gear Tooth Sensor (http://www.chiefdelphi.com/forums/showthread.php?t=51840)

Bomberofdoom 31-01-2007 10:43

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?

Alan Anderson 31-01-2007 11:14

Re: Gear Tooth Sensor
 
Quote:

Originally Posted by Bomberofdoom (Post 568798)
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.

Bomberofdoom 31-01-2007 12:39

Re: Gear Tooth Sensor
 
Quadrature signal??? (O_o')

slloyd 01-02-2007 21:12

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

Bomberofdoom 10-08-2007 05:45

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?

Steve_Alaniz 25-12-2007 14:06

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

Bomberofdoom 25-12-2007 14:35

Re: Gear Tooth Sensor
 
Thank you, that was an excellent read! :D

I even tried with the mouse (yes...I admit..I use old mouses :rolleyes: ) and if I spinned one of the "scrollers" top fast the mouse on the screen actually bounced to the other side and then back! :D

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.

Steve_Alaniz 27-12-2007 12:47

Re: Gear Tooth Sensor
 
Quote:

Originally Posted by Bomberofdoom (Post 663664)

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?

NO... the Gear Tooth sensor only give ONE signal. The Quadrature output refers to a device that can give two signals with one being 90 degrees from the other. IF you could use TWO GTS sensors and align one so that it peaks 90 degrees after the other then you could use the Quad scheme for direction.
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

Uberbots 27-12-2007 13:07

Re: Gear Tooth Sensor
 
Quote:

Originally Posted by Steve_Alaniz (Post 664202)
NO... the Gear Tooth sensor only give ONE signal. The Quadrature output refers to a device that can give two signals with one being 90 degrees from the other. IF you could use TWO GTS sensors and align one so that it peaks 90 degrees after the other then you could use the Quad scheme for direction.
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.

assuming a momentum-less world, are we?

Steve_Alaniz 27-12-2007 15:28

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

Mr. Lim 29-12-2007 02:29

Re: Gear Tooth Sensor
 
Quote:

Originally Posted by Steve_Alaniz (Post 664248)
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

If you did this, you WOULD actually get a quadrature signal that should work with Kevin Watson's encoder code out of the box.

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!

Mike Bennett 09-01-2008 21:03

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?

Sunshine 09-01-2008 22:35

Re: Gear Tooth Sensor
 
Is this what you are looking for?

Try This

macpanes 15-01-2008 21:02

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?

comphappy 15-01-2008 21:35

Re: Gear Tooth Sensor
 
Quote:

Originally Posted by slloyd (Post 569830)
our team's head programmer (GO 1221!!) got the
but, looks really tough to program. maybe need floating point math?
slloyd

Why?


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