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 / 3269
3268  |  3270
Subject: 
RE: encoders
Newsgroups: 
lugnet.robotics.handyboard
Date: 
Sat, 14 Feb 1998 07:08:05 GMT
Original-From: 
Joe Martin <joema@mpx.%NoMoreSpam%com.au>
Viewed: 
1366 times
  
-----Original Message-----
From: Will Bain [SMTP:willbain@cs.umt.edu]
Sent: Saturday, 14 February 1998 12:50
To: handyboard@media.mit.edu
Subject: Re: encoders

At 07:58 PM 2/13/98 +1100, Joe Martin wrote:
Hello all,
           I am attempting to use the shaft encoder routines but am having
trouble.When I try to load the file fencoder0.icb I get a message that ic
cannot find the file.Any hints?
  Also I would like to know whether these routines count off one edge of a
pulse or what dictates how the count is incremented.

I think the file is named fencdr0.icb by default (not fencoder.icb).

Maybe
it's just that simple (I hope)?  Also, it's probably easiest if it's in the
directory with all the other stuff you're loading (the lib directory).

These encoder routines seem to simply monitor the analog port and increase
the count whenever the reading drops below the low threshold or goes above
the high threshold.

[Joe Martin]  [Joe Martin]  [Joe Martin]

Does this mean that if you have a very slow pulse the encoder routine may
increment more than one time per pulse or is it triggered of only on a rising or
falling edge?


   The simple way to set these threshold values is to
print the value on the analog port repeatedly in a loop while spinning the
shaft around, and making a note of the low and high readings.
  My
Hall-effect magnetic sensors, for example, only range between about 110 and
135, so I set the low threshold to 115 and the high to 130, and they work
great.  Your results will vary depending on the type of sensors you're using
(IR transceiver, etc.), but if you calibrate them correctly, you'll be off
by just a constant factor.

Try the slow versions of the routines first (e.g. sencdr0.icb) instead of
the fast ones, since the slow ones are more efficient.  Good luck.

--Will Bain
                                          , ,
        __@_/             \_@__           |/
          |                /__,           o             @_/
          )\              )              ( \            (\/\\,
~~~~~~~~~ ' ` ~~~~~~~~~~~ ` ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Wendy Parson,                      Few things are harder to put up with
Will Bain,                        than the annoyance of a good example.
& Tatoosh                                                  --Mark Twain



1 Message 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