Go to Post Strategy is rarely static, and how you design your robot isn't always the best way to win the game. - Bill Moore [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #9   Spotlight this post!  
Unread 28-03-2008, 18:15
beefy23 beefy23 is offline
Registered User
no team
 
Join Date: Mar 2008
Location: Israel
Posts: 9
beefy23 is an unknown quantity at this point
Re: Question about Gear Sensor

Quote:
Originally Posted by Alan Anderson View Post
The word "quadrature" refers to two signals which are out of phase with each other by one quarter of a cycle. The signals on a quadrature encoder are digital, and there are four possible combinations: 00, 01, 11, and 10. Notice that they don't "count" in binary; instead, only one of the signals changes for a transition between states. A change from 00 to 01 indicates the encoder is turning in one direction; a change fom 01 to 00 indicates it is turning in the other. Here's the full list of possibilities:

Code:
from to direction
 00  01 forward
 00  10 reverse
 01  11 forward
 01  00 reverse
 11  10 forward
 11  01 reverse
 10  00 forward
 10  11 reverse
A simple way to use quadrature encoders is to use interrupts to detect a transition from 0 to 1 on one signal (usually called Phase A), and look at the state of the other signal (Phase B) at that time to decide which direction the sensor is turning. That only uses two of the possible eight changes, but it's sufficient: 01 to 11 is forward, and 00 to 10 is reverse.
but how can you easily get the bits content? Can you please write a code(I work in MPLAB). Thanks.

Last edited by beefy23 : 28-03-2008 at 19:20.
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Gear Tooth Sensor Question Semicolon Electrical 7 19-01-2008 22:54
Question about the IR sensor DemonYawgmoth Electrical 4 08-01-2008 22:26
Question about Gear-tooth? Nicodemus Control System 4 21-01-2007 02:19
Quick question regarding the gear tooth sensor... Brad Voracek Electrical 3 12-01-2007 01:07
Gear Tooth Sensor Question (InsrtNameHere) Electrical 2 20-01-2006 02:19


All times are GMT -5. The time now is 20:26.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi