To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.roboticsOpen lugnet.robotics in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / 15145
15144  |  15146
Subject: 
Re: Struggling with encoder wheel - Not anymore!
Newsgroups: 
lugnet.robotics
Date: 
Sat, 14 Apr 2001 23:49:59 GMT
Viewed: 
728 times
  
Well, I think I got it working last night. Many thanks to Steve Baker
for the brilliant idea of hardcoding the lookup table array as a
function. It works great!

I had to gear down the rotation for the tilt mechanism, but the pan
was fine as-is. When the tilt moved the wedges passed by the light
sensor too quickly to do a comparison to see if it's the same color as
the last couple of reads. I also discovered that no two light sensors
are created equal. The readings differed quite a bit on the two
sensors I have.

There's a lot of advantages to this setup. The biggest is of course
that it takes only one sensor instead of two to manage your
position. No need for a limit sensor. The resolution can also be
increased by making the radius of the encoder wheel larger and adding
more wedges. This of course means adding more colors or increasing the
size of a group of wedges, but it's do-able.

Another advantage is that mis-reads can be detected and corrected for,
since as the wheel turns you can expect a certain color to appear next
based on where you think you are. If the wrong color appears you can
check to see where you really are.

The main disadvantage is that the wheel has to be calibrated to the
light sensors. Fortunately both my light sensors seem to read the
black, white, and grays evenly spaced from one another, even though
one sensor sees them 6 points lower than the other.

I've updated my site at http://www.fozztexx.com/LEGO/Webcam/ with the
latest NQC code and LDraw .dat file if you want to try it out
yourself.

--
Chris Osborn                      Full System, Inc.
fozztexx@fullsystem.com           2160 Jefferson St., #240
http://www.fullsystem.com/        Napa, CA 94559
Webhosting that *works* - 99.99% uptime - First 3 months free



Message is in Reply To:
  Struggling with encoder wheel
 
I'm having a hard time finding a good algorithm for the encoder wheel I came up with for use on my webcam. The way I packed the bits in the lookup table has made it hard to get any speed out of the algorithms. I'm using NQC, and the LEGO OS seems (...) (23 years ago, 11-Apr-01, to lugnet.robotics)

19 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