Optical Mouse as Angular Position Sensor

I am a newbie and might be in the wrong place!
I am interested in info on how a optical mouse might be used to scan a rotatable antenna mast in order to read out the angular position of
the mast. Ken Burtchaell W6GHV
1
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Ken -
If you hold the mouse position fixed and can get it (the optical spot) close enough to the antenna mast, then when the mast rotates you can decode the mouse outputs and convert to angular position by using the mast diameter or circumference to convert the linear motion measurement to an angle. Instead of using two outputs from the sensor, you can get away with one since you have only one dimension to monitor.
You should get the data sheet of the optical sensor in the mouse, and see what the resolution is. If your antenna diameter is small, then maybe this method won't work well. There is also a maximum speed specification: it takes a finite amount of time for the sensor chip to image the surface and compute the motion since the last move. So, depending on how fast the mast rotates, the sensor may not be able to "keep up."
The Agilent optical mouse chips used to have continuous-time quadrature outputs for motion, as well as motion registers you could read with a micro. I am not sure about the latest ones. In any case, there are probably a few ways to interface to the chip.
Someone out there may know how to directly use the serial mouse or USB outputs. I assume above you will be talking to the optical sensor chip directly...
Have fun, Bill

Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Of course the 'mouse' readout will only give the relative position, which might be a problem unless you always start at, or set to, a known datum ...
Dave

Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Dave Garnett wrote:

Most of the optical mouse sensors I've seen can also output their per-pixel data, one byte at a time. Given the right absolute encoder strip, it could be possible to read a graycode pattern off the strip, decode it, and determine position. But, the OP noted he was a newbie at this, and this is far from a newbie project. One difficulty, for example, is focusing onto a non-planar surface.
Far easier to just place a timing pulley around the mast, connect it to another pulley attached to a multi-turn pot, and read the value of the pot. Most ham antennas don't turn more than 360 degrees.
-- Gordon Author: Constructing Robot Bases, Robot Builder's Sourcebook, Robot Builder's Bonanza
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Gordon,sorry I did not mention it before, but this antenna is a 10 foot dish which has a 3dB beamwidth of 0.7 degrees at 10GHz. I am looking for 12 bit readout numbers.I am reluctant to pay US Digital $350 for a absolute optical encoder. Ken
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Ken Burtchaell wrote:

Your problem doing this optically right on the mast is focussing to a rounded (non-planar) field. The depth of focus for an optical mouse is fairly shallow. Something (e.g. a motor) turns the mast. It's better to connect an encoder to that rather than externally to the mast, and deal with the problems inherent to any relative motion encoder -- namely unbounded cumulative error.
$395 for US Digital's ruggedized heavy-duty absolute encoder is a bargain, IMO, and probably the best all-around choice for this application. If you need to hold to sub-degree accuracy of a 10 foot microwave dish, it seems to me you don't want to mess around with a $15 optical mouse.
-- Gordon Author: Constructing Robot Bases, Robot Builder's Sourcebook, Robot Builder's Bonanza
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Very probably the most appropriate solution for the task. As the antenna is static, one lower-cost option would perhaps be to use digital magnetometer, like Devantech one. With proper calibration and appropriate mounting its perhaps able to provide sufficient resolution.
-kert
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Kaido Kert wrote:

I'm doubtful of this. The antenna is also a huge mass of metal, extruded to no particular exactness, which would most assuredly affect a magnetic sensor in ways calibration could not correct. I seriously doubt he'd get the 0.7 degree accuracy he needs. Mangetometers may have a sub-degree *resoluton*, but even the Devantech unit has a 3-4 degree *accuracy*. That some five times poorer than the requirements of the system.
-- Gordon Author: Constructing Robot Bases, Robot Builder's Sourcebook, Robot Builder's Bonanza
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Once the magnetometer is mounted, can't the effects of nearby ferromagnetic materials be taken into account - assuming the magnetometer isn't saturated by the nearby materials? Its my (maybe incorrect) understanding that these so-called "hard iron" effects are corrected (they can't be removed) by rotating the magnetometer array 360 degrees. Grab the magnetometer data while you are rotating your array. The modulus of the earth's magnetic field should be independent of which angle it is measured from, and if its not you have the error (the difference between what it should be and what your array thinks it is) which you then correct for in your magnetometer offset and sensitivity functions.
Used to be (I was told) that when you bought a new car that had a digital compass, you were supposed to drive around in a circle once or twice in a big empty parking lot in order to "calibrate" the compass and compensate for the effects of the ferrous materials in the car. An analogous thing may work for the antenna.
I lost the original thread, but does one really need 0.7 degree of accuracy in an antenna system? What kind of antenna was it?
BT

Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

I see optical mouses that have a resolution of 800dpi. Typical mast would be 2 inch diameter which should give around 5K counts/rev. The mast rotation rate would be under 1 degree/sec. I need someone to show me how to interface a single channel to a computer ant tracking program which would be looking for a 12 bit parallel or series data input or maybe the normal mouse output signal.. Hopefully someone who is familar with the mouse output and how they work into the computer could shed some light. I am too much of a computer dummy to figure it out for myself. I understand the need of a reference as this is like a incremental optical encoder. I can do this manually by rotating the mast to a fixed point but it would be nice to hear that the computer program could do this. Thanks guys, Ken
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
The optical mouse will eventually drift.
Is the rotation limited to a certain number of turns?
What is the motor that turns the mast?
Mike

spot)
decode
diameter
and
maybe
specification:
surface
the
quadrature
micro.
few
USB
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
The antenna is tracking the moon therefore the angular rate is 15 degrees per hour and total rotation will be < 180 degrees. The motor is a stepper thru a gear box. I know there is a solution to count stepper pulses. The purpose of this inquiry is to determine the feasibility to use an economical optical mouse for this task. Ken
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Well, the optical mouse is not guaranteed to count position accurately. I have used them for velocity, but they usually exhibit some degree of inaccuracy when used for position.

Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
"> Well, the optical mouse is not guaranteed to count position accurately. I

Ken
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
I don't understand this. Unless they've changed things, the sensor measures (relative) displacement. To get velocity, you need to differentiate this displacement data wrt time. This process would surely add noise unless you take special precautions (some type of filtering), but that noise would be added to the velocity. Can you get velocity data directly from the newer optical mouse sensors? How does one get "good" velocity data from inaccurate position data? I see how you can get smooth velocity from acceleration data, but from position?
Thanks in advance, Bill
If the optical properties of the surface change with time, you could have problems.

I
mouse?
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
By measureing the time between quadrature pulses, taking their inverse, and integrating it, you can get a decent velocity. I wouldn't integrate this to get position however. I use this velocity for other types of user inputs.
Mike

accurately.
the
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
The optical mouse works by tracking surface features. It can not be guaranteed that you will track the same surface features time and time again, therefore, you cannot guarantee the positional accuracy.
Mike

I
mouse?
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

bah. I'm not an engineer, though, my incredulity is based on what I learned long ago in school.
I think all you need is a non-repeating pattern extending the width of the field of view of the optical device. The simplest form of this would be a field that is half-black and half-white.
This leaves an upper bound on the slew rate determined by how many frames per unit of time the device can record and dispatch.
The lower bound on the velocity is the width of a pixel.
I'm going to look at those documents to see if there is something more concrete than this assertion, it sounds very simple and cheap to do this.
Yours,
CA (sorry about the late response, I'm just catching up!)
--
Charles Abney
Polymorphism Research Laboratory
  Click to see the full signature.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

I am an engineer who just started working on a system to allow a robot to tell where it is in a typical office environment. The engineers who have been working on this for a while seem to have rejected the idea of making the robot act like a big optical mouse out of hand, claiming that it won't come back to the same spot, and indeed the mouse on MY PC doesn't. I am not so sure that it can't come back to the same spot on a carpeted surface (essentially a random pattern) I am thinking about hooking three mice together with glue and having three PCs take a vote in order to reduce skips.
My gut feeling is that with a robot moving at a fixed speed, the guts of three mice, optics scaled up from mouse-size to robot size, and the right software, I won't see any appreciable amount of drift. I would like to discuss the theory behind this.
I have an experiment that I would like various readers to try.
Place your mouse pointer on a recognizable point on your screen, note the position of the mouse on it's pad, then slowly move your mouse in ten circles of about six inches on the mouse pad, taking about two seconds to do each loop. At the end, stop at the same pointer position and tell me how far your mouse is from it's starting point. Post the result, the model of the mouse, and the surface it's on.
If I am right, the optical mice will do better than the ball mice, and any dual beam optical mice will do better than the other optical mice.
(I wonder if some operating systems have mouse skip problems...)
--
Guy Macon, Electronics Engineer & Project Manager for hire.
Remember Doc Brown from the _Back to the Future_ movies? Do you
  Click to see the full signature.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
"Guy Macon" <http://www.guymacon.com wrote in message says...

learned
the
You can't do the PC test. It is rate based. Also, many drivers employ "ballistics". Read the quadrature directly.
The problem with scaling up the optics is that the features you are looking at can become "grey". You need to have features that are the appropriate size to the image size. If your target has a higher frequency than your sensing system, you will integrate your reading. I would not go with 1/2 the field, but rather like 1/4th, but I do not feel that a random pattern will benefit you.
If you are willing to go to the point of generating a repeating pattern, the get an agilent reflective quadrature encoder reader, and make your own scale with a laser printer.
Another problem with scaling up the optics is that the image size at the imager is so small. If memory serves, the size is like 16 pixels across 1 mm. You can get around this by having the mouse sensor image a virtual image broduced by an additional optic. There is an outfit in Texas called Detection Dynamics that sells a 1.9mm board mount lens that works well.
My tests with the mouse looking at a paper wrapped drum led to cumulitive errors which led me to not desire persuing them for position purposes.
I think for a differential drive on a robot, you will want multiple sensors, but not for the reasons you site.
Mike
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Polytechforum.com is a website by engineers for engineers. It is not affiliated with any of manufacturers or vendors discussed here. All logos and trade names are the property of their respective owners.