Anda di halaman 1dari 7

Sensors and Actuators A 157 (2010) 161167

Contents lists available at ScienceDirect

Sensors and Actuators A: Physical


journal homepage: www.elsevier.com/locate/sna

Using the image acquisition capabilities of the optical mouse sensor to build an
absolute rotary encoder
M. Tresanchez, T. Pallej, M. Teixid, J. Palacn
Departament of Computer Science and Industrial Engineering, Universitat de Lleida, Jaume II, 69, 25001 Lleida, Spain

a r t i c l e

i n f o

Article history:
Received 6 August 2009
Received in revised form 8 October 2009
Accepted 4 November 2009
Available online 13 November 2009
Keywords:
Optical mouse sensor
Rotary encoder

a b s t r a c t
In this paper, the optical mouse sensor is proposed as the main sensor of an absolute rotary encoder.
The image acquired by the optical sensor is used to read a positioning binary code printed on an internal
rotary surface to obtain the absolute rotary position. The two-dimensional image matrix acquisition is
more robust than the single reading point approach used in other absolute rotary encoders (with only
one pixel) where the position must be coded using random sequence codes. Additionally, the low cost of
the optical sensor facilitates the development of inexpensive absolute rotary encoders.
2009 Elsevier B.V. All rights reserved.

1. Introduction
Since its release in 1999, the optical mouse sensor has been
used widely as an inexpensive displacement sensor [15] but it has
some important drawbacks. It is very sensitive to height changes
[1,2], very dependent on the measurement surface [3], and circular trajectories are measured badly [4,5] because the area under
the sensor is only originally illuminated from one lateral source
[6] which enhances the shadows created by the roughness of the
surface. However, despite these known limitations, a linear displacement can be measured with a coefcient of determination of
R2 = 0.9998 [5].
The optical mouse sensor acquires ground surfaces using an
internal CMOS camera and computes an optimized optical ow
[7] to measure the over ground displacement. The image acquired
by the CMOS camera can be read and used externally, allowing
it to be employed as inexpensive image acquisition device [8] in
applications with low processing capabilities.
Recently, in [9] the optical mouse sensor was proposed to build
an incremental rotary encoder. In this proposal, the optical sensor
was placed at a given radius with a measurement displacement axis
tangential to the center of the rotating surface. The measurement
of the incremental position is prone to errors (0.3% in 200 revolutions at xed angular speed) and the internal registers that give
information about the state of the illumination control loop were
used to detect a radial line printed onto the white rotary surface.
The reference line was used to reset the cumulative displacement

Corresponding author. Tel.: +34 973 702724.


E-mail address: palacin@diei.udl.cat (J. Palacn).
0924-4247/$ see front matter 2009 Elsevier B.V. All rights reserved.
doi:10.1016/j.sna.2009.11.002

error after one complete revolution enabling its use as a precision


angular measurement device with a coefcient of determination of
R2 = 0.99991 (see [9] for additional detailed information).
The design presented in [9] has two drawbacks. The st one is
that after power up the absolute position of the encoder is unknown
(limiting its use as a relative encoder) and the second one is that the
displacement error is corrected only when a radial reference line
printed in the internal rotary white surface is detected. In a complementary way, this work proposes using the image acquisition
capabilities of the optical mouse sensor to read a binary position
code printed in the internal white rotary surface to get the absolute
position of the encoder in real-time. This proposal takes advantage
of the short focal distance offered by the optical mouse sensors,
which is almost impossible to achieve with other low cost optical
image sensors.
The previous implementation [9] used the original algorithms
implemented in the internal DSP to measure rotation and to detect
internal reference radial lines to correct cumulative displacement
errors. The proposed implementation is based on the external analysis of the images acquired by the image optical sensors internal
CMOS camera and a binary position code to indicate the absolute
position of the encoder in real-time while rotating.
Currently, most absolute rotary encoders use an optical sensor
with only one pixel to read a linear code printed in a rotary surface. This code must be based on pseudorandom binary sequences
[10] to solve the problems that arise when only one bit is available:
code reading, code reading synchronization and code conversion
[11]. The use of the two-dimensional image-array information provided by the CMOS camera of the optical mouse sensor can be used
to avoid all these known problems when resolving the absolute
angular position of the rotary encoder.

162

M. Tresanchez et al. / Sensors and Actuators A 157 (2010) 161167

Table 1
Smallest information pattern extracted correctly from the optical sensor.
Picture

Sensors image

Segmented image

Table 2
Optical sensor radial dependences.
Placement radius (mm)

2
4
6
8
10
12
14

The paper is structured as follows. Section 2 describes the capabilities of the optical mouse sensor. Section 3 describes the codes
used to print the positioning value on the rotary surface. Section
4 shows the validation of the rotary encoder. Finally, Section 5
presents the conclusions of this paper.
2. Optical sensor capabilities
The optical mouse sensor used in this paper is the ADNS-3088
[12]. This optical sensor includes a digital signal processor (DSP)
and a monochrome CMOS camera of 30 30 pixels embedded in
the same chip. The optical mouse sensor is based on a very compact
image acquisition system with the following parts [12]: the main
optical sensor, an infrared light source (LED-based) that illuminates
the surface, and a convex lens to focus the surface image on the
sensor. All parts are clipped to a base plane to keep the device very
close to the surface, at a nominal distance of 2.4 mm.
In a normal operation, the optical mouse sensor acquires
sequential surface images (size: 1.82 mm 1.82 mm) at a very high
rate (up to 6400 frames per second (fps)) and determines the
direction and magnitude of movement through the analysis of the
small displacements of the shadows created by the source light.
The optical mouse sensor also includes an internal closed control loop to maintain a constant illumination range in the images
acquired and to adapt dynamically the sampling rate to avoid image
blurring.
The internal registers of the optical sensor are accessed by the
standard SPI bus using an 8 bit address and 8 bit data message
requiring a minimum of 50 s for a read/write register operation.
The image acquired by the optical sensor can be accessed pixel by
pixel by reading the PIXEL BURST register sequentially and the rst
access freezes the image to assure that all pixels belong to the same
image. The 30 30 pixels of the monochrome image have intensity
values in a range from 0 (black) to 63 (white).
A rst experiment was developed to test the vision capabilities
of the optical sensor; a series of chess-like information patterns
were printed on a white adhesive surface (A4 paper size with
100 g/m2 weight) [9] using a standard low cost inkjet printer
(1200 1200 point per inch (ppi)). Table 1 shows the pattern with
the smallest information bits (square width of 0.19 mm or 3.3 3.3
pixels to represent an information bit) extracted correctly after
a segmentation procedure: real pictures (Table 1-left, obtained
with macro lens), the images obtained with the optical sensor
(Table 1-center), and the images segmented with a threshold value
(Table 1-right) obtained from the analysis of the histogram of the
images; 24 in the image shown. The image can have up to 9 9
binary bits before aliasing precludes the recuperation of the information from the segmented image. This value is high enough to
implement an absolute rotary encoder based on the reading of a
visual code printed on the internal white rotary surface.
The optical mouse sensor is primarily designed to measure linear displacements. When it is used to measure displacement on a
rotary surface, the maximum distance measured in one exact revolution depends only on the radius of placement of the sensor and
this value xes the resolution of the rotary encoder.

Counts (cpr)
800 cpi

400 cpi

440
794
1190
1584
1982
2364
2746

217
397
594
792
990
1182
1373

pixelREV (pixels)

bitsREV (bits)

203
407
611
815
1018
1222
1426

61
122
183
244
305
366
427

A second experiment was developed to show the radial dependences. The optical sensor was placed at the recommended height
(2.4 mm) over a rotary surface with the y-axis tangential to the
rotation and the inner rotary surface was covered with a rough
white surface to enhance the results of the measurements (additional details of similar experiments can be obtained in [9]). Table 2
shows the radial dependence for some parameters of the optical
sensor measured in one revolution: the counts measured in one
revolution (cpr) when the optical sensor operates as a displacement sensor with a resolution of 800 counts per inch (cpi), the same
for a resolution of 400 cpi, the equivalent number of image pixels
explored in one revolution (labeled pixelREV ), and the equivalent
number of information bits that can be stored in one revolution
(labeled bitsREV ). The last two parameters are computed with:
pixelREV =

2r
,
pixelW

bitsREV =

2r

pixelW

(1)

pixelsBIT

where r is the placement radius (distance from the optical sensor to


the center of rotation of the internal rotary surface of the encoder),
pixelW is the width covered by one pixel of the image and pixelsBIT is
the number of pixels needed to represent an information bit in the
image. The results shown in Table 2 allow the extraction of some
preliminary conclusions:
When the optical sensor of the mouse is congured with a resolution of 400 cpi, one count has the width of one pixel in the
image. This is because the theoretical value of pixelREV (equivalent number of pixels in one revolution) is very similar to the
counts measured in one complete revolution with a resolution of
400 cpi; the small difference is originated by the uncertainty in
the exact placement of the center of the sensor.
When the optical sensor of the mouse is congured to 800 cpi, the
optical ow procedure implemented in the sensor detects image
shifts with sub-pixel precision (0.5 pixels). This is because the
counts measured at 800 cpi practically doubles the equivalent
number of pixels in one revolution.
If an information bit has a width of 3.3 pixels, the maximum
equivalent encoder resolution can be up to (400/3.3) 121 cpi.
Detecting the position of the information bits with pixel precision, the maximum equivalent encoder resolution can rise to 400
cpi.
The counts generated in one revolution are proportional to the
radius of placement of the sensor.
3. Visual positioning code
The absolute position of the rotary encoder can be obtained by
reading a binary positioning value printed on the internal white
rotary surface (Fig. 1). The code dened must fulll the following
conditions:
The visual code must use the two dimensions available in the
image acquired by the optical sensor. Therefore, the information

M. Tresanchez et al. / Sensors and Actuators A 157 (2010) 161167

163

Fig. 3. Graphic representation of the complete code. The arrows depict different
coded position values and the dotted square the area visible to the optical sensor.
Fig. 1. Image of a prototype of the absolute rotary encoder.

bits of the visual code must be placed mainly in columns,


transversal to the rotation.
The code must be bijective.
Any image acquired by the optical sensor must have at least one
complete binary positioning value.
The code must allow precise pixel location in the image as a way
of increasing the resolution of the rotary encoder.
The binary positioning value printed in the rotary surface must
be repeated (at least once) in the radial axis (see Fig. 1) to be
robust to small errors in the radial placement of the optical sensor. In such conditions, any radial image shift induced by some
mechanical placement error or axis misalignment can be compensated because the missing upper (or lower) part of the code
is also repeated in the lower (or upper) part of the image.

The following coding strategies are proposed for printing the


binary positioning code in the white rotary surface: complete, with
up to 9 information bits available in one column and read in the
center of the image; radial, with up to 9 information bits available
in one column combined with precise positioning offset; and radial
enhanced with up to 21 bits available in three consecutive columns
combined with precise positioning offset.
The maximum angular resolution, ARMAX , which can be achieved
with the optical sensor without using a sub-pixel location algorithm, only depends on the equivalent number of pixels in one exact
revolution (and thus on the placement radius) (Fig. 2) and can be

computed with:
ARMAX =

360
pixelREV

(2)

However, this value is apparently unreachable if any information bit stored in the image is represented by several pixels. Then
the maximum angular resolution achieved by reading any information code, ARCMAX , can be computed with (Fig. 2):

ARCMAX =

360

pixelsBIT

(3)

pixelREV

But the position value obtained from the code can be complemented with the relative location of the code in the image to take
full advantage of the two dimensions in the image. Then, the absolute position in counts, C, and the absolute angle of orientation, ,
can be computed with:
C = value codeSEP + (15 valueCOL ),

= ARMAX C

(4)

where codeSEP is the distance in pixels between consecutive codes,


value is the numerical positioning value decoded from the image,
and valueCOL its central column position (in pixels) (zero if not available). The constant 15 depicts the reference central column of the
image (reference position with zero offset). Finally, the number of
information bits, NBITS , needed to code the numerical positioning
values of one revolution can be computed from the highest value
printed in the code, valueMAX , with:
NBITS =

valueMAX

(5)

3.1. Complete code

Fig. 2. Maximum angular resolution of the rotary encoder depending on the placement radius of the optical sensor.

The complete code is a proposal that uses all available information bits to store information (Fig. 3). In the complete code, each
column contains a value (indicated with arrows in Fig. 3) with up
to 9 information bits to codify the absolute position (values from 0
up to 512) of the rotary surface. In such conditions, using the 9 bits
available in the columns, the placement radius of the optical sensor
can be up to 16.4 mm from the center of the rotary surface with an
expected resolution of 0.210 (0.703 if not used the information
provided by valueCOL ).
Fig. 4 shows some images of the complete code obtained with
the optical sensor placed 15 mm from the center of rotation of the
rotary surface. The range values stored in the code were from 0
to 470 using 9 bits in the columns (0.20 0.20 mm bits). The row
corresponding to the lowest bit (b0 ) is located approximately in the
center of the image. The resolution obtained with this conguration
is 0.231 or 1553 counts per revolution (cpr).
Fig. 5 shows the procedure to decode the image acquired by
the optical sensor. The row corresponding to the lowest bit (b0 )

164

M. Tresanchez et al. / Sensors and Actuators A 157 (2010) 161167

Fig. 4. Sample images of the complete code obtained with the optical sensor (bit
size is 0.20 mm 0.20 mm).

Fig. 7. Graphic representation of the radial code. The arrows depict different coded
position values and the dotted square the area visible by the optical sensor.

umn of the binary code, valueCOL , with the absolute rotary position
(column 14 in Fig. 5). The width in pixels of the information bits
is xed so the numerical value of the absolute orientation of the
rotary encoder can be obtained using a predened set of sampling
points (squares in Fig. 5). The image shown in Fig. 5 is decoded with:
valueROW = 16, valueCOL = 14, value = 001000101, codeSEP = 3.3, and
then C = 228.7 and = 52.8 (in steps of 0.231 ).
3.2. Radial code
Fig. 5. Image of the complete code acquired by the optical sensor (left) (at a radius
of 15 mm) with the value of the cumulative distance vector, D (right) for all rows.

always has the same pattern 010101. . . and is used as an implicit


reference. The row of b0 can be detected with great precision
accumulating the absolute distances, di , from peak-to-valley and
valley-to-peak (see Fig. 6) in one row, with:
Dj =

|dij |

(6)

where Dj is the value of the cumulative distances in the row, j is the


row analyzed and i depicts the sequence of distances obtained in
the row. The maximum value of the cumulative distance vector, D
(see Fig. 5-right) is directly the central row of b0 (valueROW ).
Fig. 6 shows the peaks (circle) and valleys (triangle) detected in
the 16th row of the image. Fig. 5 shows the evolution of the cumulative distance D and the positions of the peaks (circle) and valleys
(triangle) detected in that row. Then, the position of the peak or
valley closest to the center of the image denes the central col-

Fig. 6. Intensity values at the row 16 of the image of Fig. 5 (corresponding to b0 ): di


is the absolute distance from peak-to-valley and valley-to-peak.

The main disadvantage of the previous codication is that only


9 information bits are available in the columns to write the value
of the absolute position, limiting the maximum placement radius
of the optical sensor to 16.4 mm. On one side, the vertical limit of 9
information bits in one column is unbreakable, but on the other
side, the columns with the positioning values can be separated
exploiting the valueCOL offset to increase the operational radius. The
main problem is then to locate a reference in the image to decode
the numerical positioning values properly.
The radial code (Fig. 7) has the position values stored in the
columns (Fig. 7-arrows) but separated by 3 empty information
columns to exploit the two dimensions of the image. Additionally,
a reference bit (always set to 1) is included in a second adjacent
column, in the position of b0 , to simplify image decoding. In such
conditions, using 9 information bits with the maximum separation
between codes (codeSEP ) of 23 pixels, the placement radius of the
optical sensor can be up to 130.0 mm with a resolution of 0.026 .
Fig. 8 shows some images of the complete code obtained with
the optical sensor placed 15 mm from the center of rotation of
the rotary surface. The range values stored in the code were from
1 to 91 dening only 7 information bits in the columns (bits of
0.26 mm 0.26 mm) and a separation of 17 pixels between codes.
The row corresponding to the lowest bit (b0 ) is approximately in
the center of the image. The resolution obtained with this conguration is also 0.231 or 1553 cpr, but it can be greatly extended by
increasing the radius of placement of the optical sensor.
Fig. 9 shows the procedure for decoding the image acquired by
the optical sensor. The image was segmented with a xed threshold intensity value of 22. The sum of columns (Fig. 9-bottom) is
then explored to detect the surrounding limits of the columns of

Fig. 8. Sample images of the radial code obtained with the optical sensor (bit size
is 0.26 mm 0.26 mm).

M. Tresanchez et al. / Sensors and Actuators A 157 (2010) 161167

165

Fig. 11. Sample images of the radial enhanced code obtained with the optical sensor
(bit size is 0.20 mm 0.20 mm).

Fig. 9. Segmented image of the radial code, the prole of the column of the reference
bit (right) and vector sum of the columns (down) of the segmented image.

one positioning code (Fig. 9-circles). From these limits, the prole
of the right information columns is explored (Fig. 9-right) until the
isolate reference bit is detected (Fig. 9-triangle); the central row
detected is identied as the row of the rst bit, b0 . Then, as the
size of the information bits is known, the column can be sampled
at a xed interval (Fig. 9-squares) to decode the absolute position of the rotary surface. The image shown in Fig. 9 is decoded
with: valueROW = 15, valueCOL = 19, value = 0010111, codeSEP = 17,
and then C = 387 and = 89.3 (in steps of 0.231 ).
3.3. Radial enhanced code

row has only one bit set to 1, as a reference bit for rst column
code location. The numerical value of the absolute position is coded
using the bits of three columns, and an additional column is set to
0 to simplify code reading and synchronization. Therefore, using
an information matrix of 9 9 bits, a separation between codes of
20.1 pixels, and 21 bits to store the numerical value of the absolute position; the maximum placement radius is 407.0 m with a
theoretical resolution of 0.0000085 (or 42,153,000 cpr).
Fig. 11 shows some images of the radial enhanced code obtained
with the optical sensor placed 15 mm from the center of rotation
of the rotary surface. The code uses 21 bits per position code (bit
size 0.20 mm 0.20 mm) but at 15 mm, only 7 bits are used (with
values ranging from 0 to 116). In the image, the reference row-line
is located approximately in the center.
Fig. 12 shows the procedure for decoding the image acquired by
the optical sensor. The image is segmented with a xed threshold
intensity value of 22. The cumulative sum of rows (Fig. 12-right)
for the segmented image is computed and its maximum coincides
with the central row of the reference row-line (Fig. 12-circle).
From this reference row-line, the prole of the upper adjacent
row (Fig. 12-down) is explored until the isolate reference bits
are detected (Fig. 12-triangle). Once the position of the reference
row-line and reference bit are known, a xed square sampling
patter is dened to obtain the value of the bits of the absolute
rotary position. The image shown in Fig. 12 is decoded with:
valueROW = 14, valueCOL = 10, value = 0000000-0000000-0010001,
codeSEP = 13.2, and then C = 229.4 and = 52.9 (in steps of
0.231 ).

This nal codication is a mixture of the two previous proposals


as a strategy to increase the effective placement radius of the optical
sensor over the rotary surface of the optical encoder. This code uses
the maximum number of information bits available in the image,
employing several columns to store the absolute position of the
rotary surface and some reference bits to simplify image decoding.
Fig. 10 shows the proposed radial enhanced code. One row is
fully set to 1, as a reference row-line, and the upper adjacent

Fig. 10. Graphic representation of the radial enhanced code. The arrows depict different coded position values and the dotted square, a representation of the area
visible to the optical sensor.

Fig. 12. Segmented image of the radial enhanced code, the vector sum of rows (right)
and prole of the row of the reference bit (down) of the segmented image.

166

M. Tresanchez et al. / Sensors and Actuators A 157 (2010) 161167

Table 3
Decoding error rate.
Code

Bit size (mm)

Complete
Radial
Radial enhanced

0.20 0.20
0.26 0.26
0.20 0.20

Decoded images
10,000
10,000
10,000

Erroneous
223
0
131

4. Encoder validation
Table 3 shows the error rate obtained from decoding the proposed codes with the optical sensor placed at a radius of 15 mm
from the center of the rotary surface. The rotation speed applied
to the encoder changes randomly from 10 to 100 revolutions per
minute (rpm). The images acquired by the optical sensor were
decoded using the proposed procedures. The speed of the rotary
surface (up to 100 rpm) has no blurring effect on the image because
the image sampling rate is up to 6400 fps.
The complete code is only decoded in the central columns of the
image where the illumination level is more uniform, but aliasing
between the pixels of the information bits blurs the image, obtaining a decoding error rate of 2.2%. The error rate of the radial code
is zero in 10,000 image readings because it has the highest bit size
and the lowest aliasing between information bits. In the case of
the radial enhanced code, the sampling prole used to decode the
information bits is very sensitive to small positioning errors caused
by aliasing between the reference line and the reference bit, generating an error rate of 1.3%. The error rate of the complete code
can be reduced to zero by increasing the size of the information
bits although this reduces the number of bits available to code the
positioning value and the maximum placement radius decreases
drastically. In the case of the radial enhanced code, bit size can
be increased greatly to reduce the error rate and the loss of 3 or
even 6 information bits will not have practical design effects in
the encoder. Therefore, the simplicity of the radial code will be the
best choice for placement radius up to 130 mm; higher values will
be available only with radial enhanced.
The implementation of the absolute rotary encoder can be done
in two alternative ways depending on the end application: combined and visual.
4.1. Combined
The combined mode uses all the resources available on the
optical sensor: image acquisition and automatic displacement measurement. These two resources are incompatible so the combined
mode can only be used in positioning applications where the rotary
encoder is stopped from time to time, for example in an educational
robotic arm.
The combined mode works as follows: (i) at the very beginning
the rotary encoder (rotary surface) must be stopped (no rotation) to
acquire the image and decode the absolute rotary position; this process stops sensor operation. (ii) After the absolute rotary position is
available, the optical sensor must be activated (by restarting it) to
measure displacement using the internal resources of the optical
sensor. (iii) Then, the rotary encoder can be used to measure rotation; this reading is affected by some cumulative relative errors
(refer to [9] for more details). (iv) When the rotation is stopped, the
image can be read and the absolute rotary position is then updated
to reset any cumulative rotation error caused during the motion.
The combined mode requires at least 26 ms in the initial and
nal image reading (in burst mode), but motion measurement
requires only 150 s to read the internal motion registers (MOTION,
DELTA X and DELTA Y), allowing a sampling rate up to 6.6 kHz. The
main drawback of this mode is that the rotary encoder must have
no motion during the initial image reading because until the sen-

Fig. 13. Absolute angular displacement measured by the rotary encoder in the combined mode. The circle depicts the initial and nal readings and the points, the
motion measured by the internal DSP.

sor is restarted any motion is lost. However, as this kind of optical


sensors is evolving very fast, this problem can be solved in the near
future by the manufacturer adding an internal buffer to read the
image without stopping the motion reading.
Fig. 13 shows the evolution of the absolute angular displacement
measured using the combined mode in a small rotation. The optical
sensor was placed at a radius of 15 mm and the complete code was
used to mark the position on the rotary surface. The accumulated
error during this small rotation is less than 0.004% and is corrected
after the nal image reading.
4.2. Visual
The visual mode only uses the image acquisition capabilities
of the optical sensor. The image acquired by the internal CMOS
camera is continuously read and decoded to obtain the absolute
position of the internal rotary surface. External image reading with
the selected optical mouse sensor requires at least 26 ms (in burst
mode) limiting the maximum sampling rate to 38 Hz. However,
some new optical mouse sensors (as the ADNS-9500) allow the
update of the programming code of the internal DSP and thus a
fast implementation of the proposed image decoding algorithms
that are much simpler than the computation of the optical ow of
the image (computed up to 6400 fps) originally implemented in

Fig. 14. Numerical values decoded by the rotary encoder in the visual mode.

M. Tresanchez et al. / Sensors and Actuators A 157 (2010) 161167

the device. The visual mode is ideal for applications that require
the measurement of small angular displacements, for example as a
replacement of a resistive potentiometer.
Fig. 14 shows the evolution of the absolute angular displacement measured using the visual mode for two complete rotations
at a xed speed of 10 rpm. The optical sensor was placed at a radius
of 15 mm and the measurement was repeated with all the proposed codes. Fig. 14 shows the raw position values decoded from
the images acquired by the optical sensor. The results shown have
no errors.
5. Conclusions
This work presents the implementation of an absolute rotary
encoder using the low cost optical mouse sensor. This proposal
takes full advantage of the short focal distance offered by the optical
mouse sensor (2.4 mm) to build a compact rotary encoder. The optical sensor is used to acquire the image of a positioning binary code
printed on the internal rotary surface of the encoder. The numerical
value obtained is processed to obtain the absolute angular position
with the maximum resolution.
Three binary codes have been proposed for the positioning code:
complete, radial and radial enhanced. The resolution of the encoder
only depends on the radius of placement of the optical sensor from
the center of rotation of the rotary surface. The complete code
allows a radius of up to 16.4 mm and a resolution up to 0.210 ; up
to 130.0 mm and 0.026 for the radial code; and up to 407.0 m and
0.0000085 for the radial enhanced code. The size of the information bits in the image starts in 0.20 mm 0.20 mm with a decoding
error rate lower than 3%, but this is zero for 0.26 mm 0.26 mm.
In general, the simplicity of the radial code is ideal for radius up
to 130 mm and the radial enhanced is the only choice for higher
placement radius.
The absolute rotary encoder was implemented using two alternatives. The combined mode requires an initial image reading (and
decoding) with the encoder stopped, a continuous rotation measurement using the internal capabilities of the optical sensor, and
a nal image reading (and decoding) with the encoder stopped to
obtain the corrected absolute position of the encoder. The visual
mode requires a continuous image reading (and decoding). The
sampling rates allowed are 6.6 kHz and 38 Hz, respectively.
Finally, validation results obtained with the two proposed
implementations of the absolute rotary encoder conrm that the
optical mouse sensor can be used to implement inexpensive absolute rotary encoders.
Acknowledgements
With the support of the Government of Catalonia (Comissionat
per a Universitats i Recerca, Departament dInnovaci, Universitats
i Empresa) and the European Social Fund.

167

References
[1] T.W. Ng, The optical mouse as a two-dimensional displacement sensor, Sensors
and Actuators A 107 (1) (2003) 2125.
[2] J.A. Cooney, W.L. Xu, G. Bright, Visual dead-recknoing for motion control of a mecanum-wheeled mobile robot, Mechatronics 14 (6) (2004)
623637.
[3] U. Minoni, A. Signorini, Low-cost optical motion sensor: an experimental characterization, Sensors and Actuators A 128 (2) (2006)
402408.
[4] J. Hu, Y. Chang, Y. Hsu, Calibration and on-line data selection of multiple optical
ow sensors for odometry applications, Sensors and Actuators A 149 (1) (2009)
7480.
[5] J. Palacin, I. Valganon, R. Pernia, The optical mouse for indoor mobile
robot odometry measurement, Sensors and Actuators A 126 (1) (2006)
141147.
[6] N.N.A. Charniya, S.V. Dudul, Investigations into the effects of illumination and
acceleration on optical mouse sensors as contact-free 2D measurement devices,
Sensors and Actuators A 149 (1) (2009) 8792.
[7] T. Pallej, E. Rubin, M. Teixido, M. Tresanchez, A. Fernndez del Viso, C. Rebate,
J. Palacin, Using the optical ow to implement a relative virtual mouse controlled by head movements, Journal of Universal Computer Science 14 (19)
(2008) 31273141.
[8] S. Hengstler, D. Prashanth, S. Fong, H. Aghajan, MeshEye: a hybrid-resolution
smart camera mote for applications in distributed intelligent surveillance, in:
IEEE Int. Symposium on Information Processing in Sensor Networks, April,
2007, pp. 360369.
[9] M. Tresanchez, T. Pallej, M. Teixid, J. Palacin, The optical mouse sensor as an
incremental rotary encoder, Sensors and Actuators A 155 (1) (2009) 7381.
[10] S. Engelberg, H. Benjamin, Pseudorandom sequences and the measurement of
the frequency response, IEEE Instrumentation & Measurement Magazine 8 (1)
(2005) 5459.
[11] D.B. Denic, G.S. Miljkovic, Code reading synchronization method for pseudorandom position encoders, Sensors and Actuators A 150 (2) (2009)
188191.
[12] Avago, ADNS-3080 and ADNS-3088 High Performance Optical Mouse Sensor,
www.avagotech.com, 2008.

Biographies
Marcel Tresanchez received BSc and MSc degrees in engineering from the University of Lleida (UdL), Spain in 2005 and 2007, respectively. He is currently
a PhD student in the robotics laboratory of the UdL and his research interests
include mobile robots, precision agriculture and the educational application of
robotics.
Tomas Palleja received BSc and MSc degrees in engineering from the University of
Lleida (UdL), Spain in 2004 and 2006, respectively. He is currently a PhD student in
the robotics laboratory of the UdL and his research interests include precision agriculture, mobile robots, human system interaction and the educational application of
robotics.
Merce Teixido received the BSc and MSc degrees in engineering from the University of Lleida (UdL), Spain in 2006 and 2008, respectively. She is currently a PhD
student in the robotics laboratory of the UdL and her research interests include
human computer interaction, avatar modeling and the educational application of
robotics.
Jordi Palacin received the BSc and MSc degrees in electronics from the Polytechnic University of Catalonia in 1990 and University of Barcelona (UB), Spain in
1997. He received the PhD degree in electronics from the UB in 2005. In 1992,
he joined the Department of Computer Science and Industrial Engineering at the
University of Lleida (UdL), Spain leading the robotics group. His research interest involves compact modeling, data fusion and signal processing applications in
robotics.

Anda mungkin juga menyukai