To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.handyboardOpen lugnet.robotics.handyboard in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / Handy Board / 7975
7974  |  7976
Subject: 
Re: Encoder routines
Newsgroups: 
lugnet.robotics.handyboard
Date: 
Thu, 20 Jul 2000 19:17:04 GMT
Reply-To: 
glivick@pacbell#IHateSpam#.net
Viewed: 
1793 times
  
I can offer some input on this, as I have used both the Rug Warrior approach and
the Handy Board approach that you describe.  As far as which method has an
advantage over the other is probably a qualitative assessment that is application
driven, and a bunch of other kinds of babble words as well.

The Rug Warrior method uses the pulse counter and an interrupt to keep track of
encoder clicks as they call them.  This has the advantage of running more or less
in the background, and in the case of the interrupt only delaying the execution
of the main program when it is necessary.  It's disadvantage is that it ties up
two precious port A pins.  In addition, the way the code is written in the RW
library, for every combination of a black and white stripe the count is
incremented by one, halving the potential resolution that could be had by
counting each transition.

The Handy Board approach uses the polling method to check the state of the wheel
encoders either once every 1 millisecond or once every 4 milliseconds, depending
on whether you have chosen the fast or slow encoder routines.  The advantage of
the Handy Board approach is that analog pins are used to gather the data.  There
are lots of analog pins on the Handy Board, and it isn't any sacrifice to give up
a few for encoder duty.  The disadvantage is that they run on the 1000 Hz
interrupt, taking up time there.  And the way the routines are written, they take
up a lot more time than is generally necessary, and there is no way to shut them
off.

In my applications, in which I use a Rug Warrior look-alike (my own board), I
have the option of using either method.  I've chosen the Handy Board routines,
rewritten so there is just one that runs four encoders, leaves off the velocity
portion of the routine, and which I can shut off if they aren't needed so the
system interrupt takes up less system overhead.

Hope this is informative.

Gary Livick

http://www.teleport.com/~raybutts/
tiny HC11 boards for your projects



Timothy Coyle wrote:

I've looked at the shaft encoder routines and it seems to be getting the
encoder voltage at certain times and using that to keep track of ticks. In the
past I have used an input capture to keep track of ticks. Is there a certain
advantage of one method over the other?
THanks
Tim



Message is in Reply To:
  Encoder routines
 
I've looked at the shaft encoder routines and it seems to be getting the encoder voltage at certain times and using that to keep track of ticks. In the past I have used an input capture to keep track of ticks. Is there a certain advantage of one (...) (24 years ago, 20-Jul-00, to lugnet.robotics.handyboard)

2 Messages in This Thread:

Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR