Go to Post Andy Baker's breakfast of choice is Kellog's Nuts and Bolts. - Adam Y. [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
  #11   Spotlight this post!  
Unread 11-11-2005, 14:05
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Why are four states needed with Quadratuer encoders?

Quote:
Originally Posted by Kevin Watson
If I remember correctly, several months ago Alan mentioned that he had a problem using this scheme in his position control application because his mechanism would sometimes stop right on a tick mark and generate a bunch of spurious interrupts, which would cause problems because the phase-b signal might change before the ISR could read it.
That's not quite how the problem manifested itself. The B phase isn't going to be changing at all when the encoder is hovering at an A phase transition, so the time it takes to read it isn't really an issue. The actual problem is that this simple scheme only notices the 0->1 transition, and ignores the 1->0 transition that accompanies a miniscule reverse motion of the encoder. Instead of recognizing that the encoder is "vibrating" at one spot, the software ends up counting things as if the encoder were continuously moving in one direction. Our solution was to set the hardware to interrupt on both the rising and falling edges, and complicate the interrupt service routine accordingly to recognize all four possibilities instead of just two. (That was difficult because our position tracking system used three encoders, and the RC only has two digital inputs capable of being configured to interrupt on both edges.)
 


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
2005 FRC Team Update 14 Jeffrafa General Forum 43 01-03-2005 15:52
Code: Toggle on Tap Dave Scheck Programming 0 11-02-2005 18:07
Autonomous Camera Integration GregC Programming 2 06-02-2005 14:34
State Machines doyler Programming 7 11-01-2005 00:53
Mechanical Wheel Encoders? Jaine Perotti Electrical 15 04-12-2004 22:46


All times are GMT -5. The time now is 21:05.

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